self.settings = real_vartree.settings
self.dbapi = portage.fakedbapi(settings=real_vartree.settings)
vdb_path = os.path.join(self.root, portage.VDB_PATH)
+ try:
+ # At least the parent needs to exist for the lock file.
+ portage_util.ensure_dirs(vdb_path)
+ except portage_exception.PortageException:
+ pass
vdb_lock = None
try:
if os.access(vdb_path, os.W_OK):
vdb_lock = portage_locks.lockdir(vdb_path)
- mykeys = ["SLOT", "PROVIDE", "USE", "IUSE",
+ mykeys = ["SLOT", "COUNTER", "PROVIDE", "USE", "IUSE",
"DEPEND", "RDEPEND", "PDEPEND"]
real_dbapi = real_vartree.dbapi
+ slot_counters = {}
for cpv in real_dbapi.cpv_all():
metadata = dict(izip(mykeys, real_dbapi.aux_get(cpv, mykeys)))
+ myslot = metadata["SLOT"]
+ mycp = portage.dep_getkey(cpv)
+ myslot_atom = "%s:%s" % (mycp, myslot)
+ try:
+ mycounter = long(metadata["COUNTER"])
+ except ValueError:
+ mycounter = 0
+ other_counter = slot_counters.get(myslot_atom, None)
+ if other_counter is not None:
+ if other_counter > mycounter:
+ continue
+ slot_counters[myslot_atom] = mycounter
self.dbapi.cpv_inject(cpv, metadata=metadata)
finally:
if vdb_lock:
correct merge order such that mutually blocking packages are never
installed simultaneously."""
+ if "--buildpkgonly" in self.myopts:
+ return True
+
#if "deep" in self.myparams:
if True:
# Pull in blockers from all installed packages that haven't already
pkg, vardb, self.global_updates[myroot])
dep_vals = vardb.aux_get(pkg, dep_keys)
ptype = "installed"
- myuse = vardb.aux_get(pkg, ["USE"])[0]
+ myuse = vardb.aux_get(pkg, ["USE"])[0].split()
depstr = " ".join(dep_vals)
# It is crucial to pass in final_db here in order to
# optimize dep_check calls by eliminating atoms via
xterm_titles = "notitles" not in settings.features
vdb_path = os.path.join(settings["ROOT"], portage.VDB_PATH)
+ try:
+ # At least the parent needs to exist for the lock file.
+ portage_util.ensure_dirs(vdb_path)
+ except portage_exception.PortageException:
+ pass
vdb_lock = None
try:
if os.access(vdb_path, os.W_OK):