Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13561 - in main/branches/2.1.6: bin pym/portage
Date: Thu, 30 Apr 2009 08:40:42
Message-Id: E1LzRot-0004Xr-JC@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 08:40:39 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13561
4
5 Modified:
6 main/branches/2.1.6/bin/isolated-functions.sh
7 main/branches/2.1.6/pym/portage/__init__.py
8 Log:
9 Fix ACCEPT_LICENSE handling for binary packages, so that the build-time USE
10 settings are used calculate an appropriate ACCEPT_LICENSE value. (trunk r13560)
11
12 Modified: main/branches/2.1.6/bin/isolated-functions.sh
13 ===================================================================
14 --- main/branches/2.1.6/bin/isolated-functions.sh 2009-04-30 08:36:57 UTC (rev 13560)
15 +++ main/branches/2.1.6/bin/isolated-functions.sh 2009-04-30 08:40:39 UTC (rev 13561)
16 @@ -522,7 +522,7 @@
17 ${QA_INTERCEPTORS}
18
19 # portage config variables and variables set directly by portage
20 - unset BAD BRACKET BUILD_PREFIX COLS \
21 + unset ACCEPT_LICENSE BAD BRACKET BUILD_PREFIX COLS \
22 DISTCC_DIR DISTDIR DOC_SYMLINKS_DIR \
23 EBUILD_EXIT_STATUS_FILE EBUILD_FORCE_TEST EBUILD_MASTER_PID \
24 ECLASSDIR ECLASS_DEPTH ENDCOL FAKEROOTKEY \
25
26 Modified: main/branches/2.1.6/pym/portage/__init__.py
27 ===================================================================
28 --- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 08:36:57 UTC (rev 13560)
29 +++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 08:40:39 UTC (rev 13561)
30 @@ -1061,7 +1061,7 @@
31 # environment in order to prevent sandbox from sourcing /etc/profile
32 # in it's bashrc (causing major leakage).
33 _environ_whitelist += [
34 - "BASH_ENV", "BUILD_PREFIX", "D",
35 + "ACCEPT_LICENSE", "BASH_ENV", "BUILD_PREFIX", "D",
36 "DISTDIR", "DOC_SYMLINKS_DIR", "EBUILD",
37 "EBUILD_EXIT_STATUS_FILE", "EBUILD_FORCE_TEST",
38 "EBUILD_PHASE", "ECLASSDIR", "ECLASS_DEPTH", "EMERGE_FROM",
39 @@ -2070,18 +2070,22 @@
40 big (bigger than ARG_MAX), causing execve() calls to fail with E2BIG
41 errors as in bug #262647.
42 """
43 - __slots__ = ('settings',)
44 + __slots__ = ('built_use', 'settings',)
45
46 - def __init__(self, settings):
47 + def __init__(self, built_use, settings):
48 + self.built_use = built_use
49 self.settings = settings
50
51 def __call__(self):
52 settings = self.settings
53 + use = self.built_use
54 + if use is None:
55 + use = settings['PORTAGE_USE']
56 try:
57 licenses = set(flatten(
58 dep.use_reduce(dep.paren_reduce(
59 settings['LICENSE']),
60 - uselist=settings['PORTAGE_USE'].split())))
61 + uselist=use.split())))
62 except exception.InvalidDependString:
63 licenses = set()
64 if '*' not in settings._accept_license:
65 @@ -2186,11 +2190,14 @@
66 self.modifying()
67
68 pkg = None
69 + built_use = None
70 if not isinstance(mycpv, basestring):
71 pkg = mycpv
72 mycpv = pkg.cpv
73 mydb = pkg.metadata
74 args_hash = (mycpv, id(pkg))
75 + if pkg.built:
76 + built_use = pkg.metadata['USE']
77 else:
78 args_hash = (mycpv, id(mydb))
79
80 @@ -2308,7 +2315,7 @@
81 env_configdict.pop(k, None)
82
83 env_configdict.addLazySingleton('ACCEPT_LICENSE',
84 - self._lazy_accept_license(self))
85 + self._lazy_accept_license(built_use, self))
86
87 # If reset() has not been called, it's safe to return
88 # early if IUSE has not changed.