Handling of Config Files

To update a gentoo system the command emerge does the job. But it just updates config files not edited by the user. It does not destroy customized settings. Manually edited files appear in /var/lib/portage/config and contain a checksum. Next time if a config file has to be put on the system and it does have an other checksum the characters ._cgg0000_ are put in front of the new config file and emerge tells you that updates are necessary or available.

Run cat /var/lib/portage/config to see the registered checksums.

Inside the cascading profiles (see /var/db/repos/gentoo/profiles/base/make.defaults holds the two variables CONFIG_PROTECT that says that in /etc files shall not be overwritten except the ones defined by the variable CONFIG_PROTECT_MASK.

To resolve different versions of those config files some programs are available:

etc-update

etc-update can be used to do the update. A general rule is, whatever never got touched can be updated, what manually has been updated should be saved before the update or merged with the update. etc-update has also the possibility to review the differences and merge it. Type in the number of the file to be updated, then see the difference. When done, press Q.

Alternatively the files can be merged manually using a regular editor and tools as diff.

dispatch-conf

dispatch-conf is an improved alternative to etc-update that archives old versions of the configuration files

It has a configuration file /etc/dispatch-conf.conf that defies the archive directory as:

archive-dir=/etc/config-archive

Linurs startpage