Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 177944 Details for
Bug 55321
[PATCH] per profile package.keywords
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
support package.keywords in profiles (applies against 2.1.6.4 and 2.2_rc20)
profile_keywords.patch (text/plain), 3.83 KB, created by
Zac Medico
on 2009-01-10 08:45:11 UTC
(
hide
)
Description:
support package.keywords in profiles (applies against 2.1.6.4 and 2.2_rc20)
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2009-01-10 08:45:11 UTC
Size:
3.83 KB
patch
obsolete
>Index: pym/portage/__init__.py >=================================================================== >--- pym/portage/__init__.py (revision 12409) >+++ pym/portage/__init__.py (revision 12410) >@@ -1132,6 +1132,7 @@ > 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) >@@ -1261,6 +1262,16 @@ > else: > self.prevmaskdict[mycatpkg].append(x) > >+ self._pkeywords_list = [] >+ rawpkeywords = [grabdict_package( >+ os.path.join(x, "package.keywords")) \ >+ 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] >@@ -2240,6 +2251,25 @@ > 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 >@@ -2261,7 +2291,7 @@ > # 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 >@@ -6963,7 +6993,7 @@ > > # keywords checking > eapi = metadata["EAPI"] >- mygroups = metadata["KEYWORDS"] >+ mygroups = settings._getKeywords(mycpv, metadata) > licenses = metadata["LICENSE"] > slot = metadata["SLOT"] > if eapi.startswith("-"): >@@ -6974,7 +7004,6 @@ > 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: >Index: man/portage.5 >=================================================================== >--- man/portage.5 (revision 12409) >+++ man/portage.5 (revision 12410) >@@ -29,6 +29,7 @@ > make.defaults > packages > packages.build >+package.keywords > package.mask > package.provided > package.unmask >@@ -585,6 +586,26 @@ > .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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55321
:
177944
|
177946