summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xbin/archive-conf2
-rwxr-xr-xbin/chkcontents2
-rwxr-xr-xbin/clean_locks2
-rwxr-xr-xbin/dispatch-conf2
-rwxr-xr-xbin/ebuild2
-rwxr-xr-xbin/emaint4
-rwxr-xr-xbin/emerge2
-rwxr-xr-xbin/env-update2
-rwxr-xr-xbin/fix-db.py2
-rwxr-xr-xbin/fixpackages2
-rwxr-xr-xbin/md5check.py2
-rwxr-xr-xbin/pkgname4
-rwxr-xr-xbin/portageq2
-rwxr-xr-xbin/regenworld5
-rwxr-xr-xbin/repoman2
-rwxr-xr-xbin/xpak4
-rw-r--r--pym/dispatch_conf.py2
18 files changed, 23 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index 4d203ab7..64cd1da6 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/bin/ebuild b/bin/ebuild
index 77391092..0160fa03 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -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
diff --git a/bin/emaint b/bin/emaint
index fc154852..016c64ea 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -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
diff --git a/bin/emerge b/bin/emerge
index 8b69617c..e98ea621 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -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._-+:"
diff --git a/bin/xpak b/bin/xpak
index 49102456..1a074377 100755
--- a/bin/xpak
+++ b/bin/xpak
@@ -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'