make.defaults
packages
packages.build
+package.accept_keywords
package.keywords
package.mask
package.provided
GPL-COMPATIBLE Apache-2.0 BSD BSD-2 GPL-2 GPL-3 LGPL-2.1 LGPL-3 X11 ZLIB
.fi
.TP
+.BR package.accept_keywords
+Per\-package ACCEPT_KEYWORDS for profiles. This has the same format and
+behavior as /etc/portage/package.accept_keywords, including the ability
+to list atoms without any keywords in order to accept unstable variants
+of all stable keywords listed in ACCEPT_KEYWORDS.
+.TP
.BR package.keywords
Per\-profile KEYWORDS. Useful for cases in which the effective KEYWORDS of a
given package should vary depending on which profile the user has selected.
self.pusedict = copy.deepcopy(clone.pusedict)
self.pkeywordsdict = copy.deepcopy(clone.pkeywordsdict)
self._pkeywords_list = copy.deepcopy(clone._pkeywords_list)
+ self._p_accept_keywords = copy.deepcopy(clone._p_accept_keywords)
self.pmaskdict = copy.deepcopy(clone.pmaskdict)
self.punmaskdict = copy.deepcopy(clone.punmaskdict)
self.prevmaskdict = copy.deepcopy(clone.prevmaskdict)
cpdict.setdefault(k.cp, {})[k] = v
self._pkeywords_list.append(cpdict)
+ self._p_accept_keywords = []
+ raw_p_accept_keywords = [grabdict_package(
+ os.path.join(x, "package.accept_keywords"), recursive=1) \
+ for x in self.profiles]
+ for d in raw_p_accept_keywords:
+ if not d:
+ # Omit non-existent files from the stack.
+ continue
+ cpdict = {}
+ for k, v in d.items():
+ cpdict.setdefault(k.cp, {})[k] = tuple(v)
+ self._p_accept_keywords.append(cpdict)
+
# get profile-masked use flags -- INCREMENTAL Child over parent
self.usemask_list = tuple(
tuple(grabfile(os.path.join(x, "use.mask"), recursive=1))
mygroups = self._getKeywords(cpv, metadata)
# Repoman may modify this attribute as necessary.
pgroups = self["ACCEPT_KEYWORDS"].split()
- match=0
+ matches = False
cp = cpv_getkey(cpv)
+
+ if self._p_accept_keywords:
+ cpv_slot = "%s:%s" % (cpv, metadata["SLOT"])
+ accept_keywords_defaults = tuple('~' + keyword for keyword in \
+ pgroups if keyword[:1] not in "~-")
+ for d in self._p_accept_keywords:
+ cpdict = d.get(cp)
+ if cpdict:
+ pkg_accept_keywords = \
+ _ordered_by_atom_specificity(cpdict, cpv_slot)
+ if pkg_accept_keywords:
+ for x in pkg_accept_keywords:
+ if not x:
+ x = accept_keywords_defaults
+ pgroups.extend(x)
+ matches = True
+
pkgdict = self.pkeywordsdict.get(cp)
- matches = False
if pkgdict:
cpv_slot = "%s:%s" % (cpv, metadata["SLOT"])
pkg_accept_keywords = \
inc_pgroups.add(x)
pgroups = inc_pgroups
del inc_pgroups
+
+ match = False
hasstable = False
hastesting = False
for gp in mygroups: