summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2008-05-02 04:17:52 +0000
committerMarius Mauch <genone@gentoo.org>2008-05-02 04:17:52 +0000
commit37a999b34539547395dc86c6a6e2e3095fc4f800 (patch)
tree37214a1eb47c7fcc1b7acf978047785e18bf8f53
parent8d2dd63139cb96dacfcce6c49bf19a20f7ef6ee4 (diff)
downloadportage-37a999b34539547395dc86c6a6e2e3095fc4f800.tar.gz
portage-37a999b34539547395dc86c6a6e2e3095fc4f800.tar.bz2
portage-37a999b34539547395dc86c6a6e2e3095fc4f800.zip
add config option for package sets to not be recorded in 'world'
svn path=/main/trunk/; revision=10077
-rw-r--r--cnf/sets.conf6
-rw-r--r--pym/_emerge/__init__.py2
-rw-r--r--pym/portage/sets/__init__.py4
-rw-r--r--pym/portage/sets/base.py1
4 files changed, 11 insertions, 2 deletions
diff --git a/cnf/sets.conf b/cnf/sets.conf
index 252f487d5..c0921cec9 100644
--- a/cnf/sets.conf
+++ b/cnf/sets.conf
@@ -7,6 +7,7 @@
# Not much that could be changed for world, so better leave it alone
[world]
class = portage.sets.files.WorldSet
+world-candidate = False
# Same as for world, though later portage versions might use a different class
[system]
@@ -21,13 +22,15 @@ class = portage.sets.profiles.PackagesSystemSet
# - SecuritySet: include all GLSAs
[security]
class = portage.sets.security.NewAffectedSet
+world-candidate = False
# Again, not much to change here, though people might prefer a different name
[everything]
class = portage.sets.dbapi.EverythingSet
+world-candidate = False
# The following treats all files in /etc/portage/sets as a package set called
-# 'sets/$filename'.
+# '$filename'.
[usersets]
class = portage.sets.files.StaticFileSet
multiset = true
@@ -37,3 +40,4 @@ directory = /etc/portage/sets
# to FEATURES=preserve-libs
[preserved-rebuild]
class = portage.sets.dbapi.PreservedLibraryConsumerSet
+world-candidate = False
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index d2068f1ae..18ad9abd1 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -4738,7 +4738,7 @@ class depgraph(object):
del e
all_added = []
for k in self._sets:
- if k in ("args", "world"):
+ if k in ("args", "world") or not root_config.sets[k].world_candidate:
continue
s = SETPREFIX + k
if s in world_set:
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py
index 554b534bc..d688164b5 100644
--- a/pym/portage/sets/__init__.py
+++ b/pym/portage/sets/__init__.py
@@ -67,6 +67,8 @@ class SetConfig(SafeConfigParser):
if x in self.psets:
self.errors.append("Redefinition of set '%s' (sections: '%s', '%s')" % (setname, self.psets[setname].creator, sname))
newsets[x].creator = sname
+ if self.has_option(sname, "world-candidate") and not self.getboolean(sname, "world-candidate"):
+ newsets[x].world_candidate = False
self.psets.update(newsets)
else:
self.errors.append("Section '%s' is configured as multiset, but '%s' doesn't support that configuration" % (sname, classname))
@@ -82,6 +84,8 @@ class SetConfig(SafeConfigParser):
try:
self.psets[setname] = setclass.singleBuilder(optdict, self.settings, self.trees)
self.psets[setname].creator = sname
+ if self.has_option(sname, "world-candidate") and not self.getboolean(sname, "world-candidate"):
+ self.psets[setname].world_candidate = False
except SetConfigError, e:
self.errors.append("Configuration error in section '%s': %s" % (sname, str(e)))
continue
diff --git a/pym/portage/sets/base.py b/pym/portage/sets/base.py
index 50702cff3..d64b632f9 100644
--- a/pym/portage/sets/base.py
+++ b/pym/portage/sets/base.py
@@ -24,6 +24,7 @@ class PackageSet(object):
self._loading = False
self.errors = []
self._nonatoms = set()
+ self.world_candidate = True
def __contains__(self, atom):
self._load()