auxdbkeylen=len(auxdbkeys)
def portageexit():
- if secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
+ if data.secpass > 1 and os.environ.get("SANDBOX_ON") != "1":
close_portdbapi_caches()
try:
mtimedb
# Distributed under the terms of the GNU General Public License v2
# $Id$
-from __future__ import print_function
-
__all__ = ["bindbapi", "binarytree"]
import portage
mykey = portage.cpv_getkey(fullpkg)
try:
# invalid tbz2's can hurt things.
- #print "cpv_inject("+str(fullpkg)+")"
self.dbapi.cpv_inject(fullpkg)
remote_metadata = self.__remotepkgs[mypkg]
for k, v in remote_metadata.items():
remote_metadata.pop(k, None)
self._remotepkgs[fullpkg] = remote_metadata
- #print " -- Injected"
except SystemExit as e:
raise
except:
def gettbz2(self, pkgname):
"""Fetches the package from a remote site, if necessary. Attempts to
resume if the file appears to be partially downloaded."""
- print("Fetching '"+str(pkgname)+"'")
tbz2_path = self.getname(pkgname)
tbz2name = os.path.basename(tbz2_path)
resume = False
# Distributed under the terms of the GNU General Public License v2
# $Id$
-from __future__ import print_function
-
__all__ = [
"close_portdbapi_caches", "FetchlistDict", "portagetree", "portdbapi"
]
checksums = mf.getDigests()
if not checksums:
if debug:
- print("[empty/missing/bad digest]: "+mypkg)
- return None
+ writemsg("[empty/missing/bad digest]: %s\n" % (mypkg,))
+ return {}
filesdict={}
myfiles = self.getFetchMap(mypkg, useflags=useflags)
#XXX: maybe this should be improved: take partial downloads
else:
myval = list(self._iter_match(mydep, self.cp_list(mykey)))
else:
- print("ERROR: xmatch doesn't handle", level, "query!")
- raise KeyError
+ raise AssertionError(
+ "Invalid level argument: '%s'" % level)
if self.frozen and (level not in ["match-list", "bestmatch-list"]):
self.xcache[level][mydep] = myval
phase = 'die_hooks'
if self._scheduler is None:
- portage._spawn_misc_sh(self.settings, [phase],
+ _spawn_misc_sh(self.settings, [phase],
phase=phase)
else:
self._scheduler.dblinkEbuildPhase(
def __hash__(self):
return hash(object.__getattribute__(self, '_get_target')())
+ def __ge__(self, other):
+ return object.__getattribute__(self, '_get_target')() >= other
+
+ def __gt__(self, other):
+ return object.__getattribute__(self, '_get_target')() > other
+
+ def __le__(self, other):
+ return object.__getattribute__(self, '_get_target')() <= other
+
+ def __lt__(self, other):
+ return object.__getattribute__(self, '_get_target')() < other
+
def __eq__(self, other):
return object.__getattribute__(self, '_get_target')() == other