level=logging.ERROR, noiselevel=-1)
return 1
- vardb = root_config.trees['vartree'].dbapi
- expanded_atoms = set(atoms)
- from portage.dep import Atom
- for atom in atoms:
- if not atom.startswith(SETPREFIX):
- for cpv in vardb.match(atom):
- slot, = vardb.aux_get(cpv, ['SLOT'])
- if not slot:
- slot = '0'
- expanded_atoms.add(Atom('%s:%s' % (portage.cpv_getkey(cpv), slot)))
-
pretend = '--pretend' in opts
locked = False
if not pretend and hasattr(world_set, 'lock'):
world_set.lock()
locked = True
try:
- discard_atoms = set()
world_set.load()
+ world_atoms = world_set.getAtoms()
+ vardb = root_config.trees["vartree"].dbapi
+ expanded_atoms = set(atoms)
+
+ for atom in atoms:
+ if not atom.startswith(SETPREFIX):
+ if atom.cp.startswith("null/"):
+ # try to expand category from world set
+ null_cat, pn = portage.catsplit(atom.cp)
+ for world_atom in world_atoms:
+ cat, world_pn = portage.catsplit(world_atom.cp)
+ if pn == world_pn:
+ expanded_atoms.add(
+ Atom(atom.replace("null", cat, 1),
+ allow_repo=True, allow_wildcard=True))
+
+ for cpv in vardb.match(atom):
+ slot, = vardb.aux_get(cpv, ["SLOT"])
+ if not slot:
+ slot = "0"
+ expanded_atoms.add(Atom("%s:%s" % \
+ (portage.cpv_getkey(cpv), slot)))
+
+ discard_atoms = set()
for atom in world_set:
for arg_atom in expanded_atoms:
if arg_atom.startswith(SETPREFIX):