diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-01-04 06:22:12 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-01-04 06:22:12 +0000 |
commit | 4702d26d4d2901836e186a62e74201641232ec3c (patch) | |
tree | 6a6a78d4bf2d7f31645a9d199b5f86be09c9b4cc /eclass | |
parent | collapse duplicate branches in save_config code paths to keep things simple (diff) | |
download | gentoo-2-4702d26d4d2901836e186a62e74201641232ec3c.tar.gz gentoo-2-4702d26d4d2901836e186a62e74201641232ec3c.tar.bz2 gentoo-2-4702d26d4d2901836e186a62e74201641232ec3c.zip |
check EBUILD_PHASE all the time in restore_config to catch mis-use even when USE=-savedconfig
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/savedconfig.eclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass index f07ac8658562..89f9eebfe4c2 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.17 2012/01/04 06:19:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.18 2012/01/04 06:22:12 vapier Exp $ # @ECLASS: savedconfig.eclass # @MAINTAINER: @@ -76,12 +76,13 @@ save_config() { # ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN} # @CODE restore_config() { - use savedconfig || return - case ${EBUILD_PHASE} in unpack|compile|configure|prepare) ;; *) die "Bad package! restore_config only for use in src_{unpack,compile,configure,prepare} functions!" ;; esac + + use savedconfig || return + local found check configfile local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do |