List Archive: gentoo-dev
Hi All,
A special "config file management" version of Portage is now available for
testing. This new functionality should prevent Portage from eating config
files (apologies to those who have already been unexpectedly bitten by this
problem). To install it, merge the latest version of Portage (1.5-r6). Then,
copy the following files to these locations:
/usr/portage/sys-apps/portage/files/1.5/pym/portage.py.cfg =>
/usr/lib/python2.0/portage.py
and
/usr/portage/sys-apps/portage/files/1.5/bin/ebuild.sh.cfg =>
/usr/sbin/ebuild.sh
Config file management will now be enabled. Here's it works:
Right after all files are installed to the temporary build directory (${D}),
Portage scans /etc for regular files. Any regular files found are renamed from
<filename> to ._cfg_<filename>. When these files are merged to the local
filesystem, merge() performs an extra check. If <filename> doesn't exist,
._cfg_<filename> is copied to <filename>; otherwise, no copy is performed.
Only the ._cfg_<filename> file is recorded in the package database; <filename>
is not.
This solution should be quite robust and should be compatible with all existing
packages, even those that have their own "don't zap the config file" hacks
(based on a pkg_postinst() function). I don't expect any problems, but just in
case, I think it's best that some people test the new config file management
code before I make it part of the official Portage release.
Note: This new functionality will prevent config files from being overwritten,
but was not designed to help you to keep your config files up-to-date. This
feature (config file freshness) will be added at a later date.
Please post feedback to this list.
Best Regards,
--
Daniel Robbins <drobbins@g.o>
President/CEO http://www.gentoo.org
Gentoo Technologies, Inc.
|
|