Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
Date: Wed, 04 Jan 2012 06:22:25
Message-Id: 20120104062212.372D12004B@flycatcher.gentoo.org
1 vapier 12/01/04 06:22:12
2
3 Modified: savedconfig.eclass
4 Log:
5 check EBUILD_PHASE all the time in restore_config to catch mis-use even when USE=-savedconfig
6
7 Revision Changes Path
8 1.18 eclass/savedconfig.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.18&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.18&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.17&r2=1.18
13
14 Index: savedconfig.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
17 retrieving revision 1.17
18 retrieving revision 1.18
19 diff -u -r1.17 -r1.18
20 --- savedconfig.eclass 4 Jan 2012 06:19:09 -0000 1.17
21 +++ savedconfig.eclass 4 Jan 2012 06:22:12 -0000 1.18
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2011 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.17 2012/01/04 06:19:09 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.18 2012/01/04 06:22:12 vapier Exp $
27
28 # @ECLASS: savedconfig.eclass
29 # @MAINTAINER:
30 @@ -76,12 +76,13 @@
31 # ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}
32 # @CODE
33 restore_config() {
34 - use savedconfig || return
35 -
36 case ${EBUILD_PHASE} in
37 unpack|compile|configure|prepare) ;;
38 *) die "Bad package! restore_config only for use in src_{unpack,compile,configure,prepare} functions!" ;;
39 esac
40 +
41 + use savedconfig || return
42 +
43 local found check configfile
44 local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig
45 for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do