summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-27 18:30:44 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-27 18:30:44 +0000
commit99f5234e3fe471874b3681dd5b29cc8132d4fbdb (patch)
tree88c05420c33545085093ae71317be2f450237fbc
parente8d25cc05ac431829d0e101f4d810d1e1aea7a15 (diff)
downloadportage-99f5234e3fe471874b3681dd5b29cc8132d4fbdb.tar.gz
portage-99f5234e3fe471874b3681dd5b29cc8132d4fbdb.tar.bz2
portage-99f5234e3fe471874b3681dd5b29cc8132d4fbdb.zip
Fix binTestsInit() to use correct values for PORTAGE_BIN_PATH and
PORTAGE_PYM_PATH. svn path=/main/trunk/; revision=14447
-rw-r--r--pym/portage/tests/bin/setup_env.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pym/portage/tests/bin/setup_env.py b/pym/portage/tests/bin/setup_env.py
index 086bcd5f5..fdc5cd21c 100644
--- a/pym/portage/tests/bin/setup_env.py
+++ b/pym/portage/tests/bin/setup_env.py
@@ -9,11 +9,12 @@ from portage import os
from portage import shutil
from portage.tests import TestCase
from portage.process import spawn
-from portage.const import PORTAGE_BIN_PATH
-bindir = os.path.join(os.path.dirname(os.path.dirname(
+basepath = os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))),
- "..", "..", "..", "bin", "ebuild-helpers")
+ "..", "..", "..")
+bindir = os.path.join(basepath, "bin")
+pymdir = os.path.join(basepath, "pym")
basedir = None
env = None
@@ -35,7 +36,8 @@ def binTestsInit():
env["S"] = os.path.join(basedir, "workdir")
env["PF"] = "portage-tests-0.09-r1"
env["PATH"] = bindir + ":" + env["PATH"]
- env["PORTAGE_BIN_PATH"] = PORTAGE_BIN_PATH
+ env["PORTAGE_BIN_PATH"] = bindir
+ env["PORTAGE_PYM_PATH"] = pymdir
os.mkdir(env["D"])
os.mkdir(env["T"])
os.mkdir(env["S"])
@@ -76,9 +78,10 @@ def create_portage_wrapper(bin):
return portage_func(*newargs)
return derived_func
-for bin in os.listdir(bindir):
+for bin in os.listdir(os.path.join(bindir, "ebuild-helpers")):
if bin.startswith("do") or \
bin.startswith("new") or \
bin.startswith("prep") or \
bin in ["ecompress","ecompressdir","fowners","fperms"]:
- globals()[bin] = create_portage_wrapper(os.path.join(bindir, bin))
+ globals()[bin] = create_portage_wrapper(
+ os.path.join(bindir, "ebuild-helpers", bin))