From 5dfd0274b9915604b7c3a6344772e96ded7b3040 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 10 Oct 2022 14:11:32 +0200 Subject: [PATCH] sculpt: avoid depot queries during installation This patch removes the intermediate querying of the depot while the installation of packages is in progress. This avoids misleading warning messages and reduces superfluous file-system load during the installation of large packages. Issue #4631 --- repos/gems/src/app/sculpt_manager/main.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index aab277c75d..cd5a9785e5 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -1598,20 +1598,21 @@ void Sculpt::Main::_handle_update_state() _download_queue.apply_update_state(update_state); _download_queue.remove_inactive_downloads(); - Xml_node const blueprint = _blueprint_rom.xml(); - bool const new_depot_query_needed = popup_watches_downloads - || blueprint_any_missing(blueprint) - || blueprint_any_rom_missing(blueprint); - if (new_depot_query_needed) - trigger_depot_query(); - - if (popup_watches_downloads) - _deploy.update_installation(); - bool const installation_complete = !update_state.attribute_value("progress", false); if (installation_complete) { + + Xml_node const blueprint = _blueprint_rom.xml(); + bool const new_depot_query_needed = popup_watches_downloads + || blueprint_any_missing(blueprint) + || blueprint_any_rom_missing(blueprint); + if (new_depot_query_needed) + trigger_depot_query(); + + if (popup_watches_downloads) + _deploy.update_installation(); + _deploy.reattempt_after_installation(); } }