When running etc-update, the user is offered three options: to replace the current config file, to keep it, or to merge it with the new config. It would be nice to have a forth option: to just keep the new config file as an example and rename it to something other than ._cfg????_some.config so that it is not a hidden file and is not selected again by etc-update.
Created attachment 256985 [details, diff] A patch against etc-update to save the ._cfg???? files as example configs The naming convention I adopted is as follows. If the config file is some.conf then its example config files will be saved as: some.conf.dist_0000 some.conf.dist_0001 etc. I'm thinking "dist" is short for "distribution configuration file", something along the lines of what Debian does. Also I number them sequentially in case the user wants to save more than one and not clobber earlier ones.
Created attachment 256993 [details, diff] A patch against etc-update to save the ._cfg???? files as example configs Looking at this again, we don't need the sanity check there, and if we did, we shouldn't have an exit but a return.
Thanks, this is in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=99ec8de8e69f71e9a3f04dc318c7c741c5e6563a Also, I've replace the 'seq' calls with pure bash: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=46cf3e08bc2312414fa482b8674df5ede52cbe91
This is fixed in 2.2.0_alpha8, but I'll leave this bug open until it's in an unmasked release.
Created attachment 257070 [details, diff] A patch against etc-update to save the ._cfg???? files as example configs Okay, obsessing over style now :)
Thanks, I've merged your changes here: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7081c7240a2cd234eac545279b294efa48ef4878
I've fixed it to use diff_command to check for duplicate example configs and eliminate them: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=25e39c5ee5873c54a038d8b6429cd7c8eb34f0db
This is fixed in 2.1.9.26.