From 8b85eb9b34c310869a747e55fb5b108d42dc9938 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 22 Aug 2022 16:43:48 +0200 Subject: [PATCH] sculpt.run: customize initial /config/managed/ In a Sculpt system based on the upcoming phone_manager, the event filter obtains its static configuration from /config/managed/event_filter. Without the requirement for changes at runtime, there is no need to have the phone_manager in the loop after all. Without this patch however, this file was always initialized with the template gems/sculpt/event_filter/default, which was presumably used only at boot time until the sculpt manager has produced the first generated event-filter configuration. This patch applies the choice of optional configs - i.e., a custom event_filter config - to both the config/ and the initial content of config/managed/. So in cases where the /config/managed/event_filter remains entirely static, the latter properly reflects the choosen variant. --- repos/gems/run/sculpt.run | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index f6f5c2f92c..1e9fec1453 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -717,9 +717,14 @@ puts $fd "" close $fd foreach config { fonts wifi runtime event_filter } { - set from [ingredient_path $config default] - check_xml_syntax $from - file copy $from [managed_config_path $config] } + set ingredient [single_ingredient $config "default"] + if {$ingredient != ""} { + set from [ingredient_path $config $ingredient] + set to [managed_config_path $config] + check_xml_syntax $from + copy_file $from $to + } +} copy_file [file join [initial_config_dir] fb_drv] [managed_config_path fb_drv]