Fix some more broken logic inside WorldSet.load().
authorZac Medico <zmedico@gentoo.org>
Mon, 14 Apr 2008 00:09:22 +0000 (00:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 Apr 2008 00:09:22 +0000 (00:09 -0000)
svn path=/main/trunk/; revision=9882

pym/portage/sets/files.py

index f08a7d4230648fba8abf782d649f61912c48c9b5..3fe397c5caa9c11fa547db87b0fac64b4c611860 100644 (file)
@@ -207,11 +207,13 @@ class WorldSet(EditablePackageSet):
                        atoms = data.keys()
                        self._mtime = mtime
                        atoms_changed = True
+               else:
+                       atoms.extend(self._atoms)
                try:
                        mtime = os.stat(self._filename2).st_mtime
                except (OSError, IOError):
                        mtime = None
-               if (not self._loaded or self._mtime2 != mtime or atoms_changed):
+               if (not self._loaded or self._mtime2 != mtime):
                        try:
                                data, errors = self.loader2.load()
                                for fname in errors:
@@ -225,6 +227,8 @@ class WorldSet(EditablePackageSet):
                        nonatoms = data.keys()
                        self._mtime2 = mtime
                        atoms_changed = True
+               else:
+                       nonatoms.extend(self._nonatoms)
                if atoms_changed:
                        self._setAtoms(atoms+nonatoms)