/[gentoo-x86]/eclass/savedconfig.eclass
Gentoo

Diff of /eclass/savedconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.19 Revision 1.20
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.19 2012/01/04 07:45:16 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.20 2012/01/04 08:23:51 vapier Exp $
4 4
5# @ECLASS: savedconfig.eclass 5# @ECLASS: savedconfig.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: common API for saving/restoring complex configuration files 8# @BLURB: common API for saving/restoring complex configuration files
118 ewarn "No saved config to restore - please remove USE=savedconfig or" 118 ewarn "No saved config to restore - please remove USE=savedconfig or"
119 ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}" 119 ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
120 ewarn "Your config file(s) will not be used this time" 120 ewarn "Your config file(s) will not be used this time"
121 fi 121 fi
122} 122}
123
124savedconfig_pkg_postinst() {
125 # If the user has USE=savedconfig, then chances are they
126 # are modifying these files, so keep them around. #396169
127 # This might lead to cruft build up, but the alternatives
128 # are worse :/.
129
130 if use savedconfig ; then
131 # Be lazy in our EAPI compat
132 : ${EROOT:=${ROOT}}
133
134 find "${EROOT}/etc/portage/savedconfig/${CATEGORY}/${PF}" \
135 -exec touch {} + 2>/dev/null
136 fi
137}
138
139EXPORT_FUNCTIONS pkg_postinst

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20