Make config.environ() export PKGDIR to the ebuild environment
authorZac Medico <zmedico@gentoo.org>
Fri, 30 Nov 2007 07:19:07 +0000 (07:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 30 Nov 2007 07:19:07 +0000 (07:19 -0000)
during the "package" phase since it's currently referenced
there.

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

pym/portage/__init__.py

index 43049fc94ccc93b250a178a21240fc67bd83fa95..9fff41623668405a9444b85ba5650849c35dda70 100644 (file)
@@ -2561,6 +2561,13 @@ class config(object):
                        writemsg("*** HOME not set. Setting to "+mydict["BUILD_PREFIX"]+"\n")
                        mydict["HOME"]=mydict["BUILD_PREFIX"][:]
 
+               if filter_calling_env:
+                       if "package" == self.get("EBUILD_PHASE"):
+                               for k in ("PKGDIR", ):
+                                       v = self.get(k)
+                                       if v is not None:
+                                               mydict[k] = v
+
                return mydict
 
        def thirdpartymirrors(self):