make.defaults
packages
packages.build
+package.keywords
package.mask
package.provided
package.unmask
.BR info_vars
A list of all the variables which will be displayed when you run `emerge info`.
.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.
+
+.I Format:
+.nf
+\- comment lines begin with # (no inline comments)
+\- one DEPEND atom per line followed by additional KEYWORDS
+.fi
+
+.I Example:
+.nf
+# add stable keyword to libgd
+media\-libs/libgd x86
+# remove stable keyword from mplayer and add unstable keyword
+media\-video/mplayer \-x86 ~x86
+# remove all keywords from netcat
+net-analyzer/netcat -*
+.fi
+.TP
.BR package.mask
This contains a list of DEPEND atoms for packages that should not be installed
in any profile. Useful for adding the latest KDE betas and making sure no
self.pusedict = copy.deepcopy(clone.pusedict)
self.categories = copy.deepcopy(clone.categories)
self.pkeywordsdict = copy.deepcopy(clone.pkeywordsdict)
+ self._pkeywords_list = copy.deepcopy(clone._pkeywords_list)
self.pmaskdict = copy.deepcopy(clone.pmaskdict)
self.punmaskdict = copy.deepcopy(clone.punmaskdict)
self.prevmaskdict = copy.deepcopy(clone.prevmaskdict)
else:
self.prevmaskdict[mycatpkg].append(x)
+ self._pkeywords_list = []
+ rawpkeywords = [grabdict_package(
+ os.path.join(x, "package.keywords"), recursive=1) \
+ for x in self.profiles]
+ for i in xrange(len(self.profiles)):
+ cpdict = {}
+ for k, v in rawpkeywords[i].iteritems():
+ cpdict.setdefault(dep_getkey(k), {})[k] = v
+ self._pkeywords_list.append(cpdict)
+
# get profile-masked use flags -- INCREMENTAL Child over parent
self.usemask_list = [grabfile(os.path.join(x, "use.mask")) \
for x in self.profiles]
return x
return None
+ def _getKeywords(self, cpv, metadata):
+ cp = dep_getkey(cpv)
+ pkg = "%s:%s" % (cpv, metadata["SLOT"])
+ keywords = [metadata["KEYWORDS"].split()]
+ pos = len(keywords)
+ for i in xrange(len(self.profiles)):
+ cpdict = self._pkeywords_list[i].get(cp, None)
+ if cpdict:
+ keys = list(cpdict)
+ while keys:
+ best_match = best_match_to_list(pkg, keys)
+ if best_match:
+ keys.remove(best_match)
+ keywords.insert(pos, cpdict[best_match])
+ else:
+ break
+ pos = len(keywords)
+ return stack_lists(keywords, incremental=True)
+
def _getMissingKeywords(self, cpv, metadata):
"""
Take a package and return a list of any KEYWORDS that the user may
# object (bug #139600)
egroups = self.configdict["backupenv"].get(
"ACCEPT_KEYWORDS", "").split()
- mygroups = metadata["KEYWORDS"].split()
+ mygroups = self._getKeywords(cpv, metadata)
# Repoman may modify this attribute as necessary.
pgroups = self["ACCEPT_KEYWORDS"].split()
match=0
# keywords checking
eapi = metadata["EAPI"]
- mygroups = metadata["KEYWORDS"]
+ mygroups = settings._getKeywords(mycpv, metadata)
licenses = metadata["LICENSE"]
slot = metadata["SLOT"]
if eapi.startswith("-"):
return ["EAPI %s" % eapi]
egroups = settings.configdict["backupenv"].get(
"ACCEPT_KEYWORDS", "").split()
- mygroups = mygroups.split()
pgroups = settings["ACCEPT_KEYWORDS"].split()
myarch = settings["ARCH"]
if pgroups and myarch not in pgroups: