within the same SLOT instead of the one with the smallest delta.
* glsa-check: prefer visible upgrades to masked upgrades
* equery: check for and warn about unknown options (bug 119674)
+ * equery,eclean,glsa-check,epkginfo: Only add /usr/lib/portage/pym
+ to python search path when necessary
2007-05-21: Paul Varner <fuzzyray@gentoo.org>
* echangelog: Add patch from genstef to fix issues from Bug 176337
import getopt
import fpformat
import signal
-sys.path.insert(0,'/usr/lib/portage/pym')
-import portage
+try:
+ import portage
+except ImportError:
+ sys.path.insert(0, "/usr/lib/portage/pym")
+ import portage
try:
from portage.output import *
except ImportError:
import os
import sys
-import portage
+try:
+ import portage
+except ImportError:
+ sys.path.insert(0, "/usr/lib/portage/pym")
+ import portage
import re
from stat import *
-from output import *
+try:
+ from portage.output import *
+except ImportError:
+ from output import *
from xml.sax import saxutils, make_parser, handler
from xml.sax.handler import feature_namespaces
-#sys.path.insert(0, "/usr/lib/portage/pym")
-
version="0.4.1"
def getvar(pkg, var):
sys.path.insert(0, "/usr/lib/gentoolkit/pym")
import gentoolkit
-import portage
+try:
+ import portage
+except ImportError:
+ sys.path.insert(0, "/usr/lib/portage/pym")
+ import portage
import portage_checksum
from portage_util import unique_array
import os
import sys
-sys.path.insert(0, "/usr/lib/portage/pym")
-import portage
+try:
+ import portage
+except ImportError:
+ sys.path.insert(0, "/usr/lib/portage/pym")
+ import portage
import re
from threading import Lock
import os
import sys
sys.path.insert(0, "/usr/lib/gentoolkit/pym")
-sys.path.insert(0, "/usr/lib/portage/pym")
+try:
+ import portage
+except ImportError:
+ sys.path.insert(0, "/usr/lib/portage/pym")
+ import portage
try:
from portage.output import *
raise NotImplementedError("Python versions below 2.3 have broken XML code " \
+"and are not supported")
-sys.path.insert(0, "/usr/lib/portage/pym") # to find portage.py
-
-import portage
+try:
+ import portage
+except ImportError:
+ sys.path.insert(0, "/usr/lib/portage/pym")
+ import portage
# Note: the space for rgt and rlt is important !!
opMapping = {"le": "<=", "lt": "<", "eq": "=", "gt": ">", "ge": ">=",