Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 121633 Details for
Bug 148702
when LINGUAS is unset, portage does not imply all languages by expanding all linguas into USE
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
make * a wildcard token which triggers expansion of flags from IUSE
wildcard_token.patch (text/plain), 3.29 KB, created by
Zac Medico
on 2007-06-09 23:25:18 UTC
(
hide
)
Description:
make * a wildcard token which triggers expansion of flags from IUSE
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2007-06-09 23:25:18 UTC
Size:
3.29 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 6780) >+++ pym/portage.py (revision 6785) >@@ -1693,6 +1693,7 @@ > cp = dep_getkey(mycpv) > cpv_slot = self.mycpv > pkginternaluse = "" >+ iuse = "" > if mydb: > slot, iuse = mydb.aux_get(self.mycpv, ["SLOT", "IUSE"]) > cpv_slot = "%s:%s" % (self.mycpv, slot) >@@ -1753,6 +1754,9 @@ > has_changed = True > self.configdict["pkg"]["PKGUSE"] = self.puse[:] # For saving to PUSE file > self.configdict["pkg"]["USE"] = self.puse[:] # this gets appended to USE >+ if iuse != self.configdict["pkg"].get("IUSE",""): >+ self.configdict["pkg"]["IUSE"] = iuse >+ has_changed = True > # CATEGORY is essential for doebuild calls > self.configdict["pkg"]["CATEGORY"] = mycpv.split("/")[0] > if has_changed: >@@ -1955,10 +1959,10 @@ > usesplit = [ x for x in myflags if \ > x not in self.usemask] > >- usesplit.sort() >- > # Use the calculated USE flags to regenerate the USE_EXPAND flags so > # that they are consistent. >+ iuse = self.configdict["pkg"].get("IUSE","").split() >+ iuse = set([ x.lstrip("+-") for x in iuse ]) > for var in use_expand: > prefix = var.lower() + "_" > prefix_len = len(prefix) >@@ -1969,11 +1973,34 @@ > # like LINGUAS. > var_split = [ x for x in var_split if x in expand_flags ] > var_split.extend(expand_flags.difference(var_split)) >- if var_split or var in self: >+ if (var_split or var in self) and \ >+ "*" not in var_split: > # Don't export empty USE_EXPAND vars unless the user config > # exports them as empty. This is required for vars such as > # LINGUAS, where unset and empty have different meanings. > self[var] = " ".join(var_split) >+ elif "*" in var_split: >+ # * means to enable everything in IUSE that's not masked >+ filtered_split = [] >+ for x in var_split: >+ if x == "*": >+ continue >+ if (prefix + x) in iuse: >+ filtered_split.append(x) >+ var_split = filtered_split >+ for x in iuse: >+ if x.startswith(prefix) and x not in self.usemask: >+ suffix = x[prefix_len:] >+ if suffix in var_split: >+ continue >+ var_split.append(suffix) >+ usesplit.append(x) >+ if var_split: >+ self[var] = " ".join(var_split) >+ elif var in self: >+ # ebuild.sh will see this and unset the variable so >+ # that things like LINGUAS work properly >+ self[var] = "*" > > # Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch. > if self.configdict["defaults"].has_key("ARCH"): >@@ -1981,6 +2008,7 @@ > if self.configdict["defaults"]["ARCH"] not in usesplit: > usesplit.insert(0,self.configdict["defaults"]["ARCH"]) > >+ usesplit.sort() > self.configlist[-1]["USE"]= " ".join(usesplit) > > self.already_in_regenerate = 0 >Index: bin/ebuild.sh >=================================================================== >--- bin/ebuild.sh (revision 6780) >+++ bin/ebuild.sh (revision 6785) >@@ -1585,6 +1585,11 @@ > done > export IUSE=${iuse_temp} > unset iuse_temp >+ # unset USE_EXPAND variables that contain only the special "*" token >+ for x in ${USE_EXPAND} ; do >+ [ "${!x}" == "*" ] && unset ${x} >+ done >+ unset x > # Lock the dbkey variables after the global phase > declare -r DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE DESCRIPTION > declare -r KEYWORDS INHERITED IUSE PDEPEND PROVIDE
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 148702
:
121537
|
121561
| 121633