summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 252f487d..c0921cec 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 d2068f1a..18ad9abd 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 554b534b..d688164b 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 50702cff..d64b632f 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()