On Sun, Oct 18, 2020 at 11:12 AM Felix Bier <[email protected]> wrote: > This commit adds deep copying operations when initializing config > objects from a default config. This prevents the config from being > a shallow copy of the default, ensuring that modifications to the > config do not modify the default. > > In particular, this fixes a check in write_make_conf, where the PORTDIR > variable is only written to the generated make.conf when a non-default > repo_basedir is set in /etc/catalyst/catalyst.conf. This check is never > satisfied, because confvalues is a shallow copy of confdefaults, > therefore both will always hold the same value for repo_basedir. > > For self.mounts / MOUNT_DEFAULTS this problem can also be observed, the > modifications done to self.mounts are also visible in MOUNT_DEFAULTS. > I am not aware of any bugs due to this shallow copy, but I would prefer > adding a deep copy to prevent future bugs, in case a comparision > against the default mounts is ever needed.
Nice! Thanks.
