diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-01-04 08:23:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-01-04 08:23:51 +0000 |
commit | ca92147376f7f16fe27f108aeb0f4facba4e8cbe (patch) | |
tree | 8d4f9bb41fdd3896f1aa5849e2a4b7948306d964 /eclass/savedconfig.eclass | |
parent | fix thinko in $ED setup in save_config (diff) | |
download | gentoo-2-ca92147376f7f16fe27f108aeb0f4facba4e8cbe.tar.gz gentoo-2-ca92147376f7f16fe27f108aeb0f4facba4e8cbe.tar.bz2 gentoo-2-ca92147376f7f16fe27f108aeb0f4facba4e8cbe.zip |
force mtime changes on config files so they get left behind when USE=savedconfig is active; see #396169 for the full story
Diffstat (limited to 'eclass/savedconfig.eclass')
-rw-r--r-- | eclass/savedconfig.eclass | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass index 3ef9f7f16f14..a0a8cd730f08 100644 --- a/eclass/savedconfig.eclass +++ b/eclass/savedconfig.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.19 2012/01/04 07:45:16 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.20 2012/01/04 08:23:51 vapier Exp $ # @ECLASS: savedconfig.eclass # @MAINTAINER: @@ -120,3 +120,20 @@ restore_config() { ewarn "Your config file(s) will not be used this time" fi } + +savedconfig_pkg_postinst() { + # If the user has USE=savedconfig, then chances are they + # are modifying these files, so keep them around. #396169 + # This might lead to cruft build up, but the alternatives + # are worse :/. + + if use savedconfig ; then + # Be lazy in our EAPI compat + : ${EROOT:=${ROOT}} + + find "${EROOT}/etc/portage/savedconfig/${CATEGORY}/${PF}" \ + -exec touch {} + 2>/dev/null + fi +} + +EXPORT_FUNCTIONS pkg_postinst |