"package slot have been "
print "!!! pulled into the dependency graph:"
print
- for cpv in packages:
- print " ", cpv
- print
+ for node, parents in packages:
+ print node,
+ if parents:
+ print "pulled in by"
+ for parent in parents:
+ print " ", parent
+ else:
+ print "(no parents)"
+ print
msg = []
msg.append("It may be possible to solve this problem ")
priority=priority)
return 1
else:
- self._show_slot_collision_notice((mykey, e_cpv))
+ e_parents = self.digraph.parent_nodes(existing_node)
+ myparents = []
+ if myparent:
+ myparents.append(myparent)
+ self._show_slot_collision_notice(
+ ((tuple(mybigkey), myparents),
+ (existing_node, e_parents)))
return 0
jbigkey = tuple(mybigkey)
if not mycheck[0]:
sys.stderr.write("\n\n%s\n\n" % mycheck[1])
+ sys.stderr.write("Parent: %s\n\n" % str(myparent))
sys.stderr.write("%s\n\n" % depstring)
return 0
mymerge = mycheck[1]
# The existing node can be reused.
selected_pkg = [e_type, myroot, e_cpv,
self.useFlags[myroot][e_cpv]]
- else:
- self._show_slot_collision_notice((mycpv, e_cpv))
- return 0
if myparent:
#we are a dependency, so we want to be unconditionally added
blocked_slots_final[cpv] = \
"%s:%s" % (portage.dep_getkey(cpv),
final_db.aux_get(cpv, ["SLOT"])[0])
+ blocked_slots_final_values = set(blocked_slots_final.itervalues())
for parent in list(self.blocker_parents[blocker]):
ptype, proot, pcpv, pstatus = parent
pdbapi = self.trees[proot][self.pkg_tree_map[ptype]].dbapi
# merge of either package is triggered.
continue
if pstatus == "merge" and \
- slot_atom not in blocked_slots_final.values():
+ slot_atom not in blocked_slots_final_values:
upgrade_matches = final_db.match(slot_atom)
if upgrade_matches:
# Apparently an upgrade may be able to invalidate
profdir = portdir+"/profiles/"+prof[0]
if prof[0] in arch_caches:
- dep_settings = arch_caches[prof[0]]
+ dep_settings, xcache = arch_caches[prof[0]]
else:
dep_settings = portage.config(
config_profile_path=profdir,
config_incrementals=portage_const.INCREMENTALS,
local_config=False)
- arch_caches[prof[0]] = dep_settings
+ portdb.melt()
+ portdb.freeze()
+ xcache = portdb.xcache
+ arch_caches[prof[0]] = (dep_settings, xcache)
while True:
try:
# Protect ACCEPT_KEYWORDS from config.regenerate()
trees["/"]["porttree"].settings = dep_settings
portdb.mysettings = dep_settings
+ portdb.xcache = xcache
# for package.use.mask support inside dep_check
dep_settings.setcpv("/".join((catdir, y)))
dep_settings["ACCEPT_KEYWORDS"] = " ".join(groups)
newsplit.append(_expand_new_virtuals(x, edebug, mydbapi,
mysettings, myroot=myroot, trees=trees, **kwargs))
continue
+ if not isvalidatom(x, allow_blockers=True):
+ raise portage_exception.ParseError(
+ "invalid atom: '%s'" % x)
mykey = dep_getkey(x)
if not mykey.startswith("virtual/"):
newsplit.append(x)
#convert parenthesis to sublists
mysplit = portage_dep.paren_reduce(depstring)
- if mysettings:
- mymasks = set()
- useforce = set([mysettings["ARCH"]])
- if use == "all":
- # These masks are only for repoman. In other cases, relevant masks
- # should have already been applied via config.regenerate(). Also,
- # binary or installed packages may have been built with flags that
- # are now masked, and it would be inconsistent to mask them now.
- # Additionally, myuse may consist of flags from a parent package
- # that is being merged to a $ROOT that is different from the one
- # that mysettings represents.
- mymasks.update(mysettings.usemask)
- mymasks.update(mysettings.archlist())
- mymasks.discard(mysettings["ARCH"])
- useforce.update(mysettings.useforce)
- useforce.difference_update(mymasks)
+ mymasks = set()
+ useforce = set()
+ useforce.add(mysettings["ARCH"])
+ if use == "all":
+ # This masking/forcing is only for repoman. In other cases, relevant
+ # masking/forcing should have already been applied via
+ # config.regenerate(). Also, binary or installed packages may have
+ # been built with flags that are now masked, and it would be
+ # inconsistent to mask them now. Additionally, myuse may consist of
+ # flags from a parent package that is being merged to a $ROOT that is
+ # different from the one that mysettings represents.
+ mymasks.update(mysettings.usemask)
+ mymasks.update(mysettings.archlist())
+ mymasks.discard(mysettings["ARCH"])
+ useforce.update(mysettings.useforce)
+ useforce.difference_update(mymasks)
+ try:
mysplit = portage_dep.use_reduce(mysplit, uselist=myusesplit,
masklist=mymasks, matchall=(use=="all"), excludeall=useforce)
- else:
- mysplit = portage_dep.use_reduce(mysplit,uselist=myusesplit,matchall=(use=="all"))
+ except portage_exception.InvalidDependString, e:
+ return [0, str(e)]
# Do the || conversions
mysplit=portage_dep.dep_opconvert(mysplit)
for x in self.porttrees:
# location, label, auxdbkeys
self.auxdb[x] = self.auxdbmodule(self.depcachedir, x, filtered_auxdbkeys, gid=portage_gid)
+ self._gvisible_aux_cache = {}
def _init_cache_dirs(self):
"""Create /var/cache/edb/dep and adjust permissions for the portage
return []
newlist=[]
+ accept_keywords = self.mysettings["ACCEPT_KEYWORDS"].split()
pkgdict = self.mysettings.pkeywordsdict
for mycpv in mylist:
#we need to update this next line when we have fully integrated the new db api
auxerr=0
keys = None
- try:
- keys, eapi = self.aux_get(mycpv, ["KEYWORDS", "EAPI"])
- except KeyError:
- pass
- except portage_exception.PortageException, e:
- writemsg("!!! Error: aux_get('%s', ['KEYWORDS', 'EAPI'])\n" % mycpv,
- noiselevel=-1)
- writemsg("!!! %s\n" % str(e),
- noiselevel=-1)
+ eapi = None
+ aux_cache = self._gvisible_aux_cache.get(mycpv)
+ if aux_cache is not None:
+ keys, eapi = aux_cache
+ else:
+ try:
+ keys, eapi = self.aux_get(mycpv, ["KEYWORDS", "EAPI"])
+ except KeyError:
+ pass
+ except portage_exception.PortageException, e:
+ writemsg("!!! Error: aux_get('%s', ['KEYWORDS', 'EAPI'])\n" % mycpv,
+ noiselevel=-1)
+ writemsg("!!! %s\n" % str(e),
+ noiselevel=-1)
+ self._gvisible_aux_cache[mycpv] = (keys, eapi)
if not keys:
# KEYWORDS=""
#print "!!! No KEYWORDS for "+str(mycpv)+" -- Untested Status"
continue
mygroups=keys.split()
# Repoman may modify this attribute as necessary.
- pgroups = self.mysettings["ACCEPT_KEYWORDS"].split()
+ pgroups = accept_keywords[:]
match=0
cp = dep_getkey(mycpv)
if pkgdict.has_key(cp):