Use PackageSet.getAtoms() as a wrapper around load() since load() can trigger unneces...
authorZac Medico <zmedico@gentoo.org>
Tue, 17 Jul 2007 21:16:37 +0000 (21:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 17 Jul 2007 21:16:37 +0000 (21:16 -0000)
svn path=/main/trunk/; revision=7302

pym/portage/sets/__init__.py

index d72c5c4f096fa2fbb008cb6590845107855fd7fa..163e84eaf2e1727f8ea15ee1b53efb4d917f9163 100644 (file)
@@ -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)