From: Zac Medico Date: Fri, 9 Dec 2011 04:58:33 +0000 (-0800) Subject: tests/bin: sanitize env X-Git-Tag: v2.2.0_alpha80~46 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=12f18ab6ae8d732a39924536f585dc5ab7af8bbd;p=portage.git tests/bin: sanitize env This fixes interference from FEATURES=force-prefix in the env. --- diff --git a/pym/portage/tests/bin/setup_env.py b/pym/portage/tests/bin/setup_env.py index f57a68560..1f8554e42 100644 --- a/pym/portage/tests/bin/setup_env.py +++ b/pym/portage/tests/bin/setup_env.py @@ -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())