1 |
Author: zmedico |
2 |
Date: 2009-04-30 06:58:14 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13461 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/portage/__init__.py |
7 |
Log: |
8 |
Bug #262647 - Inside config.setcpv(), never add SRC_URI to the environment |
9 |
since that can cause execve() calls to fail with E2BIG errors. (trunk r13290) |
10 |
|
11 |
Modified: main/branches/2.1.6/pym/portage/__init__.py |
12 |
=================================================================== |
13 |
--- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 06:57:56 UTC (rev 13460) |
14 |
+++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 06:58:14 UTC (rev 13461) |
15 |
@@ -998,6 +998,13 @@ |
16 |
virtuals ...etc you look in here. |
17 |
""" |
18 |
|
19 |
+ # Don't include anything that could be extremely long here (like SRC_URI) |
20 |
+ # since that could cause execve() calls to fail with E2BIG errors. For |
21 |
+ # example, see bug #262647. |
22 |
+ _setcpv_aux_keys = ('SLOT', 'RESTRICT', 'LICENSE', |
23 |
+ 'KEYWORDS', 'INHERITED', 'IUSE', 'PROVIDE', 'EAPI', |
24 |
+ 'PROPERTIES', 'DEFINED_PHASES', 'repository') |
25 |
+ |
26 |
_env_blacklist = [ |
27 |
"A", "AA", "CATEGORY", "DEPEND", "DESCRIPTION", "EAPI", |
28 |
"EBUILD_PHASE", "EMERGE_FROM", "HOMEPAGE", "INHERITED", "IUSE", |
29 |
@@ -2100,9 +2107,7 @@ |
30 |
pkg_configdict = self.configdict["pkg"] |
31 |
previous_iuse = pkg_configdict.get("IUSE") |
32 |
|
33 |
- aux_keys = [k for k in auxdbkeys \ |
34 |
- if not k.startswith("UNUSED_")] |
35 |
- aux_keys.append("repository") |
36 |
+ aux_keys = self._setcpv_aux_keys |
37 |
|
38 |
# Discard any existing metadata from the previous package, but |
39 |
# preserve things like USE_EXPAND values and PORTAGE_USE which |
40 |
@@ -2114,7 +2119,8 @@ |
41 |
pkg_configdict["PF"] = pf |
42 |
if mydb: |
43 |
if not hasattr(mydb, "aux_get"): |
44 |
- pkg_configdict.update(mydb) |
45 |
+ for k in aux_keys: |
46 |
+ pkg_configdict[k] = mydb.get(k, '') |
47 |
else: |
48 |
for k, v in izip(aux_keys, mydb.aux_get(self.mycpv, aux_keys)): |
49 |
pkg_configdict[k] = v |