feat(package,daemon): revoke registry tokens; allow daemon deps updates
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 6s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 14s

This commit is contained in:
faumaray committed 2026-12-04 07:20:06 +03:00
1 parent eb35bb6b6e
commit c7d2662cf2
11 files changed
+309 -13

No files matched your search

+13 -2
View File
@@ -578,7 +578,7 @@ make_resolve_options(const DaemonOptions &options) {
// Resolves and materializes declared dependencies without building, returning the lock context.
std::string deps_project(const DaemonOptions &options, std::string_view profile_name,
std::optional<CompilerFamily> compiler_override, std::string_view member,
bool offline) {
bool offline, bool allow_upgrade) {
auto effective_result = resolve_member_options(options, member);
if (!effective_result) {
return error_response(std::format("deps: {}", effective_result.error()));
@@ -606,6 +606,7 @@ std::string deps_project(const DaemonOptions &options, std::string_view profile_
return error_response(std::format("deps: {}", resolve_options.error()));
}
resolve_options->offline = offline;
resolve_options->allow_upgrade = allow_upgrade;
auto resolved = Package::resolve_and_materialize_dependencies(evaluated->context, *merged,
*resolve_options);
if (!resolved) {
@@ -2570,7 +2571,17 @@ DaemonServer::Impl::DispatchResult DaemonServer::Impl::dispatch(std::string_view
}
offline = *value;
}
return {deps_project(options, profile_name, compiler_override, member, offline), false};
bool allow_upgrade = false;
if (const auto entry = object->find("update"); entry != object->end()) {
const auto *value = std::get_if<bool>(&entry->second.value);
if (value == nullptr) {
return {error_response("\"update\" must be a boolean"), false};
}
allow_upgrade = *value;
}
return {deps_project(options, profile_name, compiler_override, member, offline,
allow_upgrade),
false};
}
if (*name == "install") {
InstallRequest install_request;