Remove world_sets support.
authorZac Medico <zmedico@gentoo.org>
Sat, 10 Oct 2009 02:28:46 +0000 (02:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 10 Oct 2009 02:28:46 +0000 (02:28 -0000)
svn path=/main/branches/2.1.7/; revision=14544

man/portage.5
pym/portage/_sets/files.py
pym/portage/const.py

index 50e7e98e58e86412f10ea0cc2db0556445eafd94..cfded7e58d75a2163b206694daf912c320a31746 100644 (file)
@@ -91,7 +91,6 @@ database to track installed packages
 .nf
 config
 world
-world_sets
 .fi
 .SH "GLOSSARY"
 In the following sections, some terminology may be foreign to you or used 
@@ -865,15 +864,6 @@ games\-misc/fortune\-mod\-gentoo\-dev
 dev\-libs/uclibc
 app\-cdr/cdemu
 .fi
-.TP
-.BR world_sets
-This is like the world file but instead of package atoms it contains
-packages sets which always begin with the @ character.
-
-.I Example:
-.nf
-@system
-.fi
 .RE
 .SH "REPORTING BUGS"
 Please report bugs via http://bugs.gentoo.org/
index cfa744d21f2f18b25b88f46b8087e2d4cc7f752f..77793baa0868d17a8bfbab5b5d3963d84c44bdb9 100644 (file)
@@ -11,7 +11,7 @@ from portage import _encodings
 from portage import _unicode_decode
 from portage import _unicode_encode
 from portage.util import grabfile, write_atomic, ensure_dirs, normalize_path
-from portage.const import USER_CONFIG_PATH, WORLD_FILE, WORLD_SETS_FILE
+from portage.const import USER_CONFIG_PATH, WORLD_FILE
 from portage.localization import _
 from portage.locks import lockfile, unlockfile
 from portage import portage_gid
@@ -34,25 +34,16 @@ class WorldSet(EditablePackageSet):
                self._filename = os.path.join(os.sep, root, WORLD_FILE)
                self.loader = ItemFileLoader(self._filename, self._validate)
                self._mtime = None
-               
-               self._filename2 = os.path.join(os.sep, root, WORLD_SETS_FILE)
-               self.loader2 = ItemFileLoader(self._filename2, self._validate2)
-               self._mtime2 = None
-               
+
        def _validate(self, atom):
                return ValidAtomValidator(atom)
 
-       def _validate2(self, setname):
-               return setname.startswith(SETPREFIX)
-
        def write(self):
                write_atomic(self._filename,
                        "".join(sorted("%s\n" % x for x in self._atoms)))
-               write_atomic(self._filename2, "\n".join(sorted(self._nonatoms))+"\n")
-       
+
        def load(self):
                atoms = []
-               nonatoms = []
                atoms_changed = False
                # load atoms and non-atoms from different files so the worldfile is 
                # backwards-compatible with older versions and other PMs, even though 
@@ -77,28 +68,9 @@ class WorldSet(EditablePackageSet):
                        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):
-                       try:
-                               data, errors = self.loader2.load()
-                               for fname in errors:
-                                       for e in errors[fname]:
-                                               self.errors.append(fname+": "+e)
-                       except EnvironmentError as e:
-                               if e.errno != errno.ENOENT:
-                                       raise
-                               del e
-                               data = {}
-                       nonatoms = list(data)
-                       self._mtime2 = mtime
-                       atoms_changed = True
-               else:
-                       nonatoms.extend(self._nonatoms)
+
                if atoms_changed:
-                       self._setAtoms(atoms+nonatoms)
+                       self._setAtoms(atoms)
                
        def _ensure_dirs(self):
                ensure_dirs(os.path.dirname(self._filename), gid=portage_gid, mode=0o2750, mask=0o2)
index 8b36aac141e785898a73a6fdfb801b673f5d3051..890abe83b81576e9220a1df9fc65cc17fcd18eba 100644 (file)
@@ -47,7 +47,6 @@ VDB_PATH                 = "var/db/pkg"
 CACHE_PATH               = "var/cache/edb"
 PRIVATE_PATH             = "var/lib/portage"
 WORLD_FILE               = PRIVATE_PATH + "/world"
-WORLD_SETS_FILE          = PRIVATE_PATH + "/world_sets"
 CONFIG_MEMORY_FILE       = PRIVATE_PATH + "/config"
 NEWS_LIB_PATH            = "var/lib/gentoo"