mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-10 21:01:49 +00:00
depot_deploy: check ROMs as deploy precondition
This patch marks a child as incomplete if one of the ROM modules listed in its blueprint is missing. This, in turn, triggers the update system in Sculpt, which then tries to download the missing pieces. Issue #4818
This commit is contained in:
parent
1c160d2366
commit
cec8a401ae
@ -186,6 +186,24 @@ class Depot_deploy::Child : public List_model<Child>::Element
|
||||
if (pkg.attribute_value("path", Archive::Path()) != _blueprint_pkg_path)
|
||||
return;
|
||||
|
||||
/* check for the completeness of all ROM ingredients */
|
||||
bool any_rom_missing = false;
|
||||
pkg.for_each_sub_node("missing_rom", [&] (Xml_node const &missing_rom) {
|
||||
Name const name = missing_rom.attribute_value("label", Name());
|
||||
|
||||
/* ld.lib.so is special because it is provided by the base system */
|
||||
if (name == "ld.lib.so")
|
||||
return;
|
||||
|
||||
warning("missing ROM module '", name, "' needed by ", _blueprint_pkg_path);
|
||||
any_rom_missing = true;
|
||||
});
|
||||
|
||||
if (any_rom_missing) {
|
||||
_pkg_incomplete = true;
|
||||
return;
|
||||
}
|
||||
|
||||
/* package was missing but is installed now */
|
||||
_pkg_incomplete = false;
|
||||
|
||||
@ -276,7 +294,7 @@ class Depot_deploy::Child : public List_model<Child>::Element
|
||||
|
||||
bool blueprint_needed() const
|
||||
{
|
||||
if (_configured() || _pkg_incomplete)
|
||||
if (_configured())
|
||||
return false;
|
||||
|
||||
if (_defined_by_launcher() && !_launcher_xml.constructed())
|
||||
|
@ -134,7 +134,7 @@ void Sculpt::Deploy::handle_deploy()
|
||||
error("spurious exception during deploy update (apply_blueprint)"); }
|
||||
|
||||
/* update query for blueprints of all unconfigured start nodes */
|
||||
if (_children.any_blueprint_needed())
|
||||
if (_children.any_blueprint_needed() && !_download_queue.any_active_download())
|
||||
_depot_query.trigger_depot_query();
|
||||
|
||||
/* feed missing packages to installation queue */
|
||||
|
@ -419,7 +419,7 @@ struct Sculpt::Popup_dialog : Dialog
|
||||
|
||||
_blueprint_info = construction.blueprint_info;
|
||||
|
||||
if (_blueprint_info.ready_to_deploy())
|
||||
if (_blueprint_info.ready_to_deploy() && _state == PKG_REQUESTED)
|
||||
_state = PKG_SHOWN;
|
||||
|
||||
_refresh.refresh_popup_dialog();
|
||||
|
Loading…
x
Reference in New Issue
Block a user