From e76ce058443883f79e755bdbc141a33aa0f20d40 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 21 Nov 2019 15:04:55 +0100 Subject: [PATCH] sculpt manager: ignore empty deploy configs When copying config/managed/deploy to config/deploy, the latter may temporarily result in an empty configuration. Such an intermediate state should be ignored to keep the currently running scenario in tact instead of restarting it. --- repos/gems/src/app/sculpt_manager/deploy.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repos/gems/src/app/sculpt_manager/deploy.h b/repos/gems/src/app/sculpt_manager/deploy.h index 80c962307..c8805b29f 100644 --- a/repos/gems/src/app/sculpt_manager/deploy.h +++ b/repos/gems/src/app/sculpt_manager/deploy.h @@ -74,6 +74,15 @@ struct Sculpt::Deploy void update_managed_deploy_config(Xml_node deploy) { + /* + * Ignore intermediate states that may occur when manually updating + * the config/deploy configuration. Depending on the tool used, + * the original file may be unlinked before the new version is + * created. The temporary empty configuration must not be applied. + */ + if (deploy.type() == "empty") + return; + _managed_deploy_config.generate([&] (Xml_generator &xml) { Arch const arch = deploy.attribute_value("arch", Arch());