Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Frequently Asked Questions
  • Search

GF2: xx config files need updating

Some of the most commonly heard questions in the Gentoo Community, along with answers.
Post Reply
Advanced search
1 post • Page 1 of 1
Author
Message
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

GF2: xx config files need updating

  • Quote

Post by pjp » Wed Nov 20, 2002 9:31 pm

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:
* 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:
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: Select all

# 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: Select all

# 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?
Top
Post Reply
1 post • Page 1 of 1

Return to “Frequently Asked Questions”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic