diff options
author | Marius Mauch <genone@gentoo.org> | 2006-10-26 13:49:45 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2006-10-26 13:49:45 +0000 |
commit | d110e776d3c178444130b1361a50b00eac7c0275 (patch) | |
tree | 6fae6e36adc1da056de8e52c32e0e01680a85fec | |
parent | Reverse the relationship between __contains__ and has_key in all cache classe... (diff) | |
download | portage-idfetch-d110e776d3c178444130b1361a50b00eac7c0275.tar.gz portage-idfetch-d110e776d3c178444130b1361a50b00eac7c0275.tar.bz2 portage-idfetch-d110e776d3c178444130b1361a50b00eac7c0275.zip |
streamline portage pythonpath handling and add an override analog to how the bash side does it
svn path=/main/trunk/; revision=4822
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | bin/archive-conf | 2 | ||||
-rwxr-xr-x | bin/chkcontents | 2 | ||||
-rwxr-xr-x | bin/clean_locks | 2 | ||||
-rwxr-xr-x | bin/dispatch-conf | 2 | ||||
-rwxr-xr-x | bin/ebuild | 2 | ||||
-rwxr-xr-x | bin/emaint | 4 | ||||
-rwxr-xr-x | bin/emerge | 2 | ||||
-rwxr-xr-x | bin/env-update | 2 | ||||
-rwxr-xr-x | bin/fix-db.py | 2 | ||||
-rwxr-xr-x | bin/fixpackages | 2 | ||||
-rwxr-xr-x | bin/md5check.py | 2 | ||||
-rwxr-xr-x | bin/pkgname | 4 | ||||
-rwxr-xr-x | bin/portageq | 2 | ||||
-rwxr-xr-x | bin/regenworld | 5 | ||||
-rwxr-xr-x | bin/repoman | 2 | ||||
-rwxr-xr-x | bin/xpak | 4 | ||||
-rw-r--r-- | pym/dispatch_conf.py | 2 |
18 files changed, 23 insertions, 22 deletions
@@ -19,6 +19,8 @@ portage-2.1.2 order and detection of circular dependencies. * The world and system sets allow automatic update of all installed slots. * DEPEND atoms support SLOT dependencies of the form ${CATEGORY}/${PN}:${SLOT}. +* Development: Extend PORTAGE_PYM_PATH support to allow overriding the hardcoded + /usr/lib/portage/pym for development/testing purposes portage-2.1.1 ------------ diff --git a/bin/archive-conf b/bin/archive-conf index 24f0b626..0417e97c 100755 --- a/bin/archive-conf +++ b/bin/archive-conf @@ -11,7 +11,7 @@ # import os, sys, string -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage, dispatch_conf diff --git a/bin/chkcontents b/bin/chkcontents index bff77d0d..4523b630 100755 --- a/bin/chkcontents +++ b/bin/chkcontents @@ -9,7 +9,7 @@ # the right files). import string, os.path, os, sys -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage def CONTENTScheck(path): diff --git a/bin/clean_locks b/bin/clean_locks index 0ecb6242..9c7e110c 100755 --- a/bin/clean_locks +++ b/bin/clean_locks @@ -4,7 +4,7 @@ # $Id$ import os,sys,errno -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage_locks diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 960a3831..de937425 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -15,7 +15,7 @@ from stat import * from random import * import atexit, commands, os, re, shutil, stat, string, sys -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage, dispatch_conf from portage_exec import find_binary @@ -21,7 +21,7 @@ if "merge" in pargs: os.environ["FEATURES"] = os.environ.get("FEATURES", "") + " -noauto" os.environ["PORTAGE_CALLER"]="ebuild" -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage, portage_util, portage_const @@ -1,7 +1,7 @@ #!/usr/bin/python -O -import sys -sys.path.insert(0, "/usr/lib/portage/pym") +import sys, os +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) from optparse import OptionParser, OptionValueError import re @@ -21,7 +21,7 @@ except KeyboardInterrupt: sys.exit(1) import os, stat -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) os.environ["PORTAGE_LEGACY_GLOBALS"] = "false" import portage diff --git a/bin/env-update b/bin/env-update index 28699634..1026b1fc 100755 --- a/bin/env-update +++ b/bin/env-update @@ -4,7 +4,7 @@ # $Id$ import os,sys -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) def usage(status): print "Usage: env-update [--no-ldconfig]" diff --git a/bin/fix-db.py b/bin/fix-db.py index 16a15150..fef1a4d4 100755 --- a/bin/fix-db.py +++ b/bin/fix-db.py @@ -4,7 +4,7 @@ # $Id$ import os,sys,re -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) from stat import * from output import * diff --git a/bin/fixpackages b/bin/fixpackages index 5eddb1c3..f9d09dec 100755 --- a/bin/fixpackages +++ b/bin/fixpackages @@ -5,7 +5,7 @@ import os,sys os.environ["PORTAGE_CALLER"]="fixpackages" -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage diff --git a/bin/md5check.py b/bin/md5check.py index 04a76ab4..98f3c810 100755 --- a/bin/md5check.py +++ b/bin/md5check.py @@ -5,7 +5,7 @@ import os,sys,string os.environ["FEATURES"]="mirror cvs" -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage from threading import * diff --git a/bin/pkgname b/bin/pkgname index d1ba2f3d..546b05d3 100755 --- a/bin/pkgname +++ b/bin/pkgname @@ -3,8 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import sys -sys.path = ["/usr/lib/portage/pym"]+sys.path +import sys, os +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage diff --git a/bin/portageq b/bin/portageq index ffbc13f6..0424647b 100755 --- a/bin/portageq +++ b/bin/portageq @@ -20,7 +20,7 @@ except KeyboardInterrupt: sys.exit(1) import os -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import types,string diff --git a/bin/regenworld b/bin/regenworld index 7b14c213..d5e28dd7 100755 --- a/bin/regenworld +++ b/bin/regenworld @@ -3,9 +3,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import sys -sys.path.insert(0, "/usr/lib/portage/pym") -import os +import sys, os +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage, string, re __candidatematcher__ = re.compile("^[0-9]+: \\*\\*\\* emerge ") diff --git a/bin/repoman b/bin/repoman index ba4e6241..c05ae9e4 100755 --- a/bin/repoman +++ b/bin/repoman @@ -11,7 +11,7 @@ import errno, os, shutil, sys if not hasattr(__builtins__, "set"): from sets import Set as set exename=os.path.basename(sys.argv[0]) -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) version="1.2" allowed_filename_chars="a-zA-Z0-9._-+:" @@ -3,12 +3,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -import sys +import sys, os if len(sys.argv)!=3: print "xpak: expecting three arguments." sys.exit(1) -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import xpak xpak.xpak(sys.argv[1],sys.argv[2]) diff --git a/pym/dispatch_conf.py b/pym/dispatch_conf.py index 9e2c0bd2..e4c512c4 100644 --- a/pym/dispatch_conf.py +++ b/pym/dispatch_conf.py @@ -10,7 +10,7 @@ from stat import * import os, sys, commands, shutil -sys.path = ["/usr/lib/portage/pym"]+sys.path +sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym")) import portage RCS_BRANCH = '1.1.1' |