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
This commit is contained in:
Norman Feske 2022-10-10 14:11:32 +02:00 committed by Christian Helmuth
parent 0ccf11256f
commit 5dfd0274b9

View File

@ -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();
}
}