Gentoo Archives: gentoo-dev

From: Daniel Robbins <drobbins@g.o>
To: gentoo-dev@g.o
Subject: [gentoo-dev] Portage config file management ready
Date: Fri, 01 Jun 2001 15:37:36
Message-Id: 20010601153736.A2538@cvs.gentoo.org
1 Hi All,
2
3 A special "config file management" version of Portage is now available for
4 testing. This new functionality should prevent Portage from eating config
5 files (apologies to those who have already been unexpectedly bitten by this
6 problem). To install it, merge the latest version of Portage (1.5-r6). Then,
7 copy the following files to these locations:
8
9 /usr/portage/sys-apps/portage/files/1.5/pym/portage.py.cfg =>
10 /usr/lib/python2.0/portage.py
11
12 and
13
14 /usr/portage/sys-apps/portage/files/1.5/bin/ebuild.sh.cfg =>
15 /usr/sbin/ebuild.sh
16
17 Config file management will now be enabled. Here's it works:
18
19 Right after all files are installed to the temporary build directory (${D}),
20 Portage scans /etc for regular files. Any regular files found are renamed from
21 <filename> to ._cfg_<filename>. When these files are merged to the local
22 filesystem, merge() performs an extra check. If <filename> doesn't exist,
23 ._cfg_<filename> is copied to <filename>; otherwise, no copy is performed.
24 Only the ._cfg_<filename> file is recorded in the package database; <filename>
25 is not.
26
27 This solution should be quite robust and should be compatible with all existing
28 packages, even those that have their own "don't zap the config file" hacks
29 (based on a pkg_postinst() function). I don't expect any problems, but just in
30 case, I think it's best that some people test the new config file management
31 code before I make it part of the official Portage release.
32
33 Note: This new functionality will prevent config files from being overwritten,
34 but was not designed to help you to keep your config files up-to-date. This
35 feature (config file freshness) will be added at a later date.
36
37 Please post feedback to this list.
38
39 Best Regards,
40
41 --
42 Daniel Robbins <drobbins@g.o>
43 President/CEO http://www.gentoo.org
44 Gentoo Technologies, Inc.