Bug #262647 - Explicitly exclude SRC_URI and other potentially long metadata
authorZac Medico <zmedico@gentoo.org>
Sat, 13 Feb 2010 23:03:39 +0000 (23:03 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 13 Feb 2010 23:03:39 +0000 (23:03 -0000)
variables from config.environ() exports, to avoid potential E2BIG errors from
execve calls.

svn path=/main/trunk/; revision=15347

pym/portage/__init__.py

index 381701b60f74008dbd9b1dee7918516706e401de..da135cff39fb99841a5c9bca17f19eee07008e6f 100644 (file)
@@ -1365,9 +1365,6 @@ class config(object):
        virtuals ...etc you look in here.
        """
 
-       # Don't include anything that could be extremely long here (like SRC_URI)
-       # since that could cause execve() calls to fail with E2BIG errors. For
-       # example, see bug #262647.
        _setcpv_aux_keys = ('SLOT', 'RESTRICT', 'LICENSE',
                'KEYWORDS',  'INHERITED', 'IUSE', 'PROVIDE', 'EAPI',
                'PROPERTIES', 'DEFINED_PHASES', 'repository')
@@ -1466,6 +1463,13 @@ class config(object):
        # they don't needlessly propagate down into the ebuild environment.
        _environ_filter = []
 
+       # Exclude anything that could be extremely long here (like SRC_URI)
+       # since that could cause execve() calls to fail with E2BIG errors. For
+       # example, see bug #262647.
+       _environ_filter += [
+               'DEPEND', 'RDEPEND', 'PDEPEND', 'SRC_URI',
+       ]
+
        # misc variables inherited from the calling environment
        _environ_filter += [
                "INFOPATH", "MANPATH", "USER",