Gentoo Archives: gentoo-commits

From: "Marius Mauch (genone)" <genone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10077 - in main/trunk: cnf pym/_emerge pym/portage/sets
Date: Fri, 02 May 2008 04:17:56
Message-Id: E1JrmiX-0008C1-SL@stork.gentoo.org
1 Author: genone
2 Date: 2008-05-02 04:17:52 +0000 (Fri, 02 May 2008)
3 New Revision: 10077
4
5 Modified:
6 main/trunk/cnf/sets.conf
7 main/trunk/pym/_emerge/__init__.py
8 main/trunk/pym/portage/sets/__init__.py
9 main/trunk/pym/portage/sets/base.py
10 Log:
11 add config option for package sets to not be recorded in 'world'
12
13 Modified: main/trunk/cnf/sets.conf
14 ===================================================================
15 --- main/trunk/cnf/sets.conf 2008-05-02 03:33:09 UTC (rev 10076)
16 +++ main/trunk/cnf/sets.conf 2008-05-02 04:17:52 UTC (rev 10077)
17 @@ -7,6 +7,7 @@
18 # Not much that could be changed for world, so better leave it alone
19 [world]
20 class = portage.sets.files.WorldSet
21 +world-candidate = False
22
23 # Same as for world, though later portage versions might use a different class
24 [system]
25 @@ -21,13 +22,15 @@
26 # - SecuritySet: include all GLSAs
27 [security]
28 class = portage.sets.security.NewAffectedSet
29 +world-candidate = False
30
31 # Again, not much to change here, though people might prefer a different name
32 [everything]
33 class = portage.sets.dbapi.EverythingSet
34 +world-candidate = False
35
36 # The following treats all files in /etc/portage/sets as a package set called
37 -# 'sets/$filename'.
38 +# '$filename'.
39 [usersets]
40 class = portage.sets.files.StaticFileSet
41 multiset = true
42 @@ -37,3 +40,4 @@
43 # to FEATURES=preserve-libs
44 [preserved-rebuild]
45 class = portage.sets.dbapi.PreservedLibraryConsumerSet
46 +world-candidate = False
47
48 Modified: main/trunk/pym/_emerge/__init__.py
49 ===================================================================
50 --- main/trunk/pym/_emerge/__init__.py 2008-05-02 03:33:09 UTC (rev 10076)
51 +++ main/trunk/pym/_emerge/__init__.py 2008-05-02 04:17:52 UTC (rev 10077)
52 @@ -4738,7 +4738,7 @@
53 del e
54 all_added = []
55 for k in self._sets:
56 - if k in ("args", "world"):
57 + if k in ("args", "world") or not root_config.sets[k].world_candidate:
58 continue
59 s = SETPREFIX + k
60 if s in world_set:
61
62 Modified: main/trunk/pym/portage/sets/__init__.py
63 ===================================================================
64 --- main/trunk/pym/portage/sets/__init__.py 2008-05-02 03:33:09 UTC (rev 10076)
65 +++ main/trunk/pym/portage/sets/__init__.py 2008-05-02 04:17:52 UTC (rev 10077)
66 @@ -67,6 +67,8 @@
67 if x in self.psets:
68 self.errors.append("Redefinition of set '%s' (sections: '%s', '%s')" % (setname, self.psets[setname].creator, sname))
69 newsets[x].creator = sname
70 + if self.has_option(sname, "world-candidate") and not self.getboolean(sname, "world-candidate"):
71 + newsets[x].world_candidate = False
72 self.psets.update(newsets)
73 else:
74 self.errors.append("Section '%s' is configured as multiset, but '%s' doesn't support that configuration" % (sname, classname))
75 @@ -82,6 +84,8 @@
76 try:
77 self.psets[setname] = setclass.singleBuilder(optdict, self.settings, self.trees)
78 self.psets[setname].creator = sname
79 + if self.has_option(sname, "world-candidate") and not self.getboolean(sname, "world-candidate"):
80 + self.psets[setname].world_candidate = False
81 except SetConfigError, e:
82 self.errors.append("Configuration error in section '%s': %s" % (sname, str(e)))
83 continue
84
85 Modified: main/trunk/pym/portage/sets/base.py
86 ===================================================================
87 --- main/trunk/pym/portage/sets/base.py 2008-05-02 03:33:09 UTC (rev 10076)
88 +++ main/trunk/pym/portage/sets/base.py 2008-05-02 04:17:52 UTC (rev 10077)
89 @@ -24,6 +24,7 @@
90 self._loading = False
91 self.errors = []
92 self._nonatoms = set()
93 + self.world_candidate = True
94
95 def __contains__(self, atom):
96 self._load()
97
98 --
99 gentoo-commits@l.g.o mailing list