From: Zac Medico Date: Tue, 17 Jul 2007 21:16:37 +0000 (-0000) Subject: Use PackageSet.getAtoms() as a wrapper around load() since load() can trigger unneces... X-Git-Tag: v2.2_pre1~996 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=085722d4efbf9db30b51b2e38460980bfe4a3e01;p=portage.git Use PackageSet.getAtoms() as a wrapper around load() since load() can trigger unnecessary stat calls. svn path=/main/trunk/; revision=7302 --- diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py index d72c5c4f0..163e84eaf 100644 --- a/pym/portage/sets/__init__.py +++ b/pym/portage/sets/__init__.py @@ -114,12 +114,9 @@ class PackageSet(object): return None class EditablePackageSet(PackageSet): - def getAtoms(self): - self.load() - return self._atoms def update(self, atoms): - self.load() + self.getAtoms() self._atoms.update(atoms) self._updateAtomMap() self.write() @@ -132,13 +129,12 @@ class EditablePackageSet(PackageSet): self.write() def remove(self, atom): - self.load() + self.getAtoms() self._atoms.discard(atom) self._updateAtomMap() self.write() def removePackageAtoms(self, cp): - self.load() for a in self.getAtoms(): if dep_getkey(a) == cp: self.remove(a)