projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fb1ca8
)
Automatically add PORTAGE_BIN_PATH to the front of PATH.
author
Zac Medico
<zmedico@gentoo.org>
Thu, 22 Apr 2010 19:36:23 +0000
(12:36 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 22 Apr 2010 19:36:23 +0000
(12:36 -0700)
pym/portage/tests/runTests
patch
|
blob
|
history
diff --git
a/pym/portage/tests/runTests
b/pym/portage/tests/runTests
index 3afe8e20fc59dd8f1f02fe57d7ace519a3e8f04e..8e8a3a44321e2dbbbab50b019c4faeaf368c47db 100755
(executable)
--- a/
pym/portage/tests/runTests
+++ b/
pym/portage/tests/runTests
@@
-11,6
+11,13
@@
import os.path as osp
sys.path.insert(0, osp.dirname(osp.dirname(osp.dirname(osp.abspath(__file__)))))
import portage.tests as tests
+from portage.const import PORTAGE_BIN_PATH
+path = os.environ.get("PATH", "").split(":")
+path = [x for x in path if x]
+if not path or not os.path.samefile(path[0], PORTAGE_BIN_PATH):
+ path.insert(0, PORTAGE_BIN_PATH)
+ os.environ["PATH"] = ":".join(path)
+del path
if __name__ == "__main__":
result = tests.main()