If we get an empty list from the history, that means the empty string
was specified on the cli, and hence we should treat it as a reset (by
setting the xxx_was_none field in the dict same as we would when parsing
it from the cli).
Note that we only need to do this for list based settings as regular
values will just have their default value written into the history.
f"Ignoring {s.long} from the CLI. Run with -f to rebuild the image with this setting"
)
+ if s.dest in history and isinstance(history[s.dest], (list, dict, set)) and not history[s.dest]:
+ history[f"{s.dest}_was_none"] = True
+
context.cli |= history
cli = copy.deepcopy(context.cli)