if myfavkey in added_favorites:
continue
added_favorites.add(myfavkey)
- world_set.add(myfavkey)
- print ">>> Recording",myfavkey,"in \"world\" favorites file..."
except portage.exception.InvalidDependString, e:
writemsg("\n\n!!! '%s' has invalid PROVIDE: %s\n" % \
(pkg_key, str(e)), noiselevel=-1)
writemsg("!!! see '%s'\n\n" % os.path.join(
root, portage.VDB_PATH, pkg_key, "PROVIDE"), noiselevel=-1)
del e
+ all_added = []
+ for k in self._sets:
+ if k in ("args", "world"):
+ continue
+ s = SETPREFIX + k
+ if s in world_set:
+ continue
+ all_added.append(SETPREFIX + k)
+ all_added.extend(added_favorites)
+ all_added.sort()
+ for a in all_added:
+ print ">>> Recording %s in \"world\" favorites file..." % \
+ colorize("INFORM", a)
+ if all_added:
+ world_set.update(all_added)
world_set.unlock()
def loadResumeCommand(self, resume_data):
pkglist.append(pkg)
else:
pkglist = mydepgraph.altlist()
- if favorites:
- mydepgraph.saveNomergeFavorites()
+ mydepgraph.saveNomergeFavorites()
del mydepgraph
mergetask = MergeTask(settings, trees, myopts)
retval = mergetask.merge(pkglist, favorites, mtimedb)
self._nonatoms = set()
def __contains__(self, atom):
- return atom in self.getAtoms()
+ return atom in self.getAtoms() or atom in self._nonatoms
def __iter__(self):
for x in self.getAtoms():
def update(self, atoms):
self.getAtoms()
- self._atoms.update(atoms)
- self._updateAtomMap(atoms=atoms)
- self.write()
+ modified = False
+ normal_atoms = []
+ for a in atoms:
+ if isvalidatom(a):
+ normal_atoms.append(a)
+ else:
+ modified = True
+ self._nonatoms.add(a)
+ if normal_atoms:
+ modified = True
+ self._atoms.update(normal_atoms)
+ self._updateAtomMap(atoms=normal_atoms)
+ if modified:
+ self.write()
def add(self, atom):
self.update([atom])