When you update packages in your Gentoo Linux system you should be careful to avoid the configuration files to be overriden by new ones during the emerge process. To protect the configuration files in your system portage provides a feature called config file protection.
Take a look at /etc/make.globals and find out the CONFIG_PROTECT variable. This variable contains a list of protected directories and it will look something like:
CONFIG_PROTECT=”/etc /usr/share/config”
Simply add your protected directories separated by white spaces. Now new files will not override existing files installed in a protected directory, instead they will be renamed as ._cfg0000_blah. In addition etc-update is available to assist you while merging these files.
Note that portage will not delete files in protected directories when a package is unmerged.
References:
- emerge -h config
- man etc-update