From 6cfe94381020218337380d76406fcf94b153dee6 Mon Sep 17 00:00:00 2001 From: Andre Detsch Date: Mon, 14 Oct 2024 15:44:22 -0300 Subject: [PATCH] api: extended: Select target with all apps when running an apps sync Previous code was using the current target object, which is based on the current running system, and may not contain all available apps. This could lead to an issue where the apps sync update fails later on in the online case, since equality between the latest available and selected target is checked, and all apps must be included. Signed-off-by: Andre Detsch --- src/aklite_client_ext.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aklite_client_ext.cc b/src/aklite_client_ext.cc index c9290c73..846f3284 100644 --- a/src/aklite_client_ext.cc +++ b/src/aklite_client_ext.cc @@ -123,7 +123,7 @@ GetTargetToInstallResult AkliteClientExt::GetTargetToInstall(const CheckInResult auto apps_to_update = client_->appsToUpdate(Target::fromTufTarget(current)); if (force_apps_sync || !apps_to_update.empty()) { // Force installation of apps - res.selected_target = current; + res.selected_target = checkin_res.SelectTarget(current.Version()); LOG_INFO << "The specified Target is already installed, enforcing installation to make sure it's synced and running:" << res.selected_target.Name();