Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GF2: xx config files need updating
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Frequently Asked Questions
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20506

PostPosted: Wed Nov 20, 2002 9:31 pm    Post subject: GF2: xx config files need updating Reply with quote

Navigation: [Gentoo Fundamentals] [Table of Contents]

Q: I did an "emerge <package-name>", and xx config files need updating. What do I do?


A: Chances are, the output you saw looked something like this:
Quote:
* Regenerating GNU info directory index...
* Processed 70 info files.
* IMPORTANT: 40 config files in /etc need updating.
* Type emerge --help config to learn how to update config files.
If we do what we are instructed to (emerge --help config), we then see:
Quote:
Config file management support (preliminary)

Portage has a special feature called "config file protection". The purpose of
this feature is to prevent new package installs from clobbering existing
configuration files. By default, config file protection is turned on for /etc
and the KDE configuration dirs; more may be added in the future.

When Portage installs a file into a protected directory tree like /etc, any
existing files will not be overwritten. If a file of the same name already
exists, Portage will change the name of the to-be- installed file from 'foo' to
'._cfg0000_foo'. If '._cfg0000_foo' already exists, this name becomes
'._cfg0001_foo', etc. In this way, existing files are not overwritten,
allowing the administrator to manually merge the new config files and avoid any
unexpected changes.

In addition to protecting overwritten files, Portage will not delete any files
from a protected directory when a package is unmerged. While this may be a
little bit untidy, it does prevent potentially valuable config files from being
deleted, which is of paramount importance.

Protected directories are set using the CONFIG_PROTECT variable, normally
defined in /etc/make.globals. Directory exceptions to the CONFIG_PROTECTed
directories can be specified using the CONFIG_PROTECT_MASK variable. To find
files that need to be updated in /etc, type:

# find /etc -iname '._cfg????_*'

You can disable this feature by setting CONFIG_PROTECT="-*" in /etc/make.conf.
Then, Portage will mercilessly auto-update your config files. Alternatively,
you can leave Config File Protection on but tell Portage that it can overwrite
files in certain specific /etc subdirectories. For example, if you wanted
Portage to automatically update your rc scripts and your wget configuration,
but didn't want any other changes made without your explicit approval, you'd
add this to /etc/make.conf:

CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
This explains what is going on, so I won't repeat that. Next, we are instructed to use the find command to get a list of what needs updating (find /etc -iname '._cfg????_*'). For example, you might see:
Code:
# find /etc -iname '._cfg????_*'
/etc/conf.d/._cfg0000_net
/etc/init.d/._cfg0000_clock
/etc/init.d/._cfg0000_bootmisc
/etc/init.d/._cfg0000_checkfs
/etc/skel/._cfg0000_.bash_profile
/etc/skel/._cfg0000_.bashrc
/etc/._cfg0000_fstab
/etc/._cfg0000_hosts
/etc/._cfg0000_modules.autoload
Note: Output will vary depending on your system and the package emerged. For reference, this is only a partial listing after an emerge of baselayout.

If, I repeat, IF you have not made changes to a file, it is probably safe to update. Two ways of updating the config files are using the "diff" command or the "etc-update" command.


Method using "diff":
/etc/init.d/bootmisc might be a file you haven't changed. Sample ouput if we diff these files:
Code:
# diff  bootmisc ._cfg0000_bootmisc
3,4c3,4
< # Distributed under the terms of the GNU General Public License, v2 or later
< # $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/bootmisc,v 1.22 2002/11/04 14:51:07 azarah Exp $
---
> # Distributed under the terms of the GNU General Public License v2
> # $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/bootmisc,v 1.23 2002/11/18 13:07:02 azarah Exp $
In this example, the only differences are the "Distributed" and "Header" lines. These particular lines aren't critical, so we can replace the old file with the new file (mv ._cfg0000_bootmisc bootmisc).


Method using "etc-update":

Instructions needed.


Post comments on this FAQ to [FAQF] GF2: xx config files need updating.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Frequently Asked Questions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum