Pass along PORTAGE_USERNAME and PORTAGE_GRPNAME inside _load_config()
authorZac Medico <zmedico@gentoo.org>
Sun, 15 Aug 2010 07:57:30 +0000 (00:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 15 Aug 2010 07:57:30 +0000 (00:57 -0700)
since since they need to be inherited by ebuild subprocesses.

pym/portage/tests/resolver/ResolverPlayground.py

index effeb41f7cd7ce0645b6914e91088f2bd4c1805f..64cd6f1dbe69bc211c4bda0bca56f1be01801aab 100644 (file)
@@ -198,11 +198,15 @@ class ResolverPlayground(object):
                f.close()
 
        def _load_config(self):
+               # Pass along PORTAGE_USERNAME and PORTAGE_GRPNAME since they
+               # need to be inherited by ebuild subprocesses.
                env = {
                        "ACCEPT_KEYWORDS": "x86",
                        "PORTDIR": self.portdir,
                        "ROOT": self.root,
-                       'PORTAGE_TMPDIR' : os.path.join(self.root, 'var/tmp')
+                       'PORTAGE_TMPDIR'       : os.path.join(self.root, 'var/tmp'),
+                       'PORTAGE_USERNAME'     : os.environ["PORTAGE_USERNAME"],
+                       'PORTAGE_GRPNAME'      : os.environ["PORTAGE_GRPNAME"],
                }
 
                settings = config(config_root=self.root, target_root=self.root, env=env)