tests/bin: sanitize env
authorZac Medico <zmedico@gentoo.org>
Fri, 9 Dec 2011 04:58:33 +0000 (20:58 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 9 Dec 2011 04:58:54 +0000 (20:58 -0800)
This fixes interference from FEATURES=force-prefix in the env.

pym/portage/tests/bin/setup_env.py

index f57a68560b451f84ae0f8bb30def2c88d2e36461..1f8554e426aa73511285d5dff59081a2eec51157 100644 (file)
@@ -1,5 +1,5 @@
 # setup_env.py -- Make sure bin subdir has sane env for testing
-# Copyright 2007-2010 Gentoo Foundation
+# Copyright 2007-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import tempfile
@@ -29,13 +29,13 @@ def binTestsInit():
        binTestsCleanup()
        global basedir, env
        basedir = tempfile.mkdtemp()
-       env = os.environ.copy()
+       env = {}
        env["EAPI"] = "0"
        env["D"] = os.path.join(basedir, "image")
        env["T"] = os.path.join(basedir, "temp")
        env["S"] = os.path.join(basedir, "workdir")
        env["PF"] = "portage-tests-0.09-r1"
-       env["PATH"] = bindir + ":" + env["PATH"]
+       env["PATH"] = bindir + ":" + os.environ["PATH"]
        env["PORTAGE_BIN_PATH"] = bindir
        env["PORTAGE_PYM_PATH"] = pymdir
        env["PORTAGE_INST_UID"] = str(os.getuid())