WIP: new fundamental config CRUD action options
i wasn't planning on working on this yet, but got sidelined into it via a discussion in the mailing list.
there's 8 commits, but pretty tiny overall.
the focus here is on doing some work to help towards the problems of:
- users running
lb config
over an existing config, thus modifying it, potentially resulting in stale values from blocked auto-determination. -
auto/clean
files explicitly deleting config files by filename, posing a problem for being able to change the set of files the config is stored in, in future.
i have more ideas in this area that i might explore later, but this implements some small, easy, and significant steps towards solving them.
essentially this boils down to a few new options and using those options in the example auto files.
things are explained in the commit logs, but to give a very brief overview:
-
lb config --ignore-saved
ignores existing saved options. it can be particularly useful to have in anauto/config
file such that whenever you make a change in it, the generated config will not contain stale values, without having to bother first running a command to delete the existing config (likelb clean
with an auto file that removes them). -
lb clean --saved-config
deletes the saved config files (not the whole config directory). it is particularly useful forauto/clean
files to replace directly deleting the files by filename. -
lb config --purge-saved
deletes the saved files then exits. the previous command is actually a shortcut to this. this exists also primarily because it does not require elevated privileges. thelb clean
redirect is useful also though.
there's also a couple of optimisations that were made as part of this:
- we no longer bother trying to load config and then reprocess args when no config directory exists.
- a more optimal and correct handling of
--ignore-system-defaults
simply by using a new variable.
Edited by Lyndon Brown