Lines 2029-2062
Link Here
|
2029 |
# like LINGUAS. |
2029 |
# like LINGUAS. |
2030 |
var_split = [ x for x in var_split if x in expand_flags ] |
2030 |
var_split = [ x for x in var_split if x in expand_flags ] |
2031 |
var_split.extend(expand_flags.difference(var_split)) |
2031 |
var_split.extend(expand_flags.difference(var_split)) |
2032 |
if (var_split or var in self) and \ |
2032 |
has_wildcard = "*" in var_split |
2033 |
"*" not in var_split: |
2033 |
if has_wildcard: |
|
|
2034 |
var_split = [ x for x in var_split if x != "*" ] |
2035 |
has_iuse = False |
2036 |
for x in iuse: |
2037 |
if x.startswith(prefix): |
2038 |
has_iuse = True |
2039 |
break |
2040 |
if has_wildcard: |
2041 |
# * means to enable everything in IUSE that's not masked |
2042 |
if has_iuse: |
2043 |
for x in iuse: |
2044 |
if x.startswith(prefix) and x not in self.usemask: |
2045 |
suffix = x[prefix_len:] |
2046 |
if suffix in var_split: |
2047 |
continue |
2048 |
var_split.append(suffix) |
2049 |
usesplit.append(x) |
2050 |
else: |
2051 |
# If there is a wildcard and no matching flags in IUSE then |
2052 |
# LINGUAS should be unset so that all .mo files are |
2053 |
# installed. |
2054 |
var_split = [] |
2055 |
if var_split: |
2056 |
self[var] = " ".join(var_split) |
2057 |
else: |
2034 |
# Don't export empty USE_EXPAND vars unless the user config |
2058 |
# Don't export empty USE_EXPAND vars unless the user config |
2035 |
# exports them as empty. This is required for vars such as |
2059 |
# exports them as empty. This is required for vars such as |
2036 |
# LINGUAS, where unset and empty have different meanings. |
2060 |
# LINGUAS, where unset and empty have different meanings. |
2037 |
self[var] = " ".join(var_split) |
2061 |
if has_wildcard: |
2038 |
elif "*" in var_split: |
|
|
2039 |
# * means to enable everything in IUSE that's not masked |
2040 |
filtered_split = [] |
2041 |
for x in var_split: |
2042 |
if x == "*": |
2043 |
continue |
2044 |
if (prefix + x) in iuse: |
2045 |
filtered_split.append(x) |
2046 |
var_split = filtered_split |
2047 |
for x in iuse: |
2048 |
if x.startswith(prefix) and x not in self.usemask: |
2049 |
suffix = x[prefix_len:] |
2050 |
if suffix in var_split: |
2051 |
continue |
2052 |
var_split.append(suffix) |
2053 |
usesplit.append(x) |
2054 |
if var_split: |
2055 |
self[var] = " ".join(var_split) |
2056 |
elif var in self: |
2057 |
# ebuild.sh will see this and unset the variable so |
2062 |
# ebuild.sh will see this and unset the variable so |
2058 |
# that things like LINGUAS work properly |
2063 |
# that things like LINGUAS work properly |
2059 |
self[var] = "*" |
2064 |
self[var] = "*" |
|
|
2065 |
else: |
2066 |
if has_iuse: |
2067 |
self[var] = "" |
2068 |
else: |
2069 |
# It's not in IUSE, so just allow the variable content |
2070 |
# to pass through if it is defined somewhere. This |
2071 |
# allows packages that support LINGUAS but don't |
2072 |
# declare it in IUSE to use the variable outside of the |
2073 |
# USE_EXPAND context. |
2074 |
pass |
2060 |
|
2075 |
|
2061 |
# Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch. |
2076 |
# Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch. |
2062 |
if self.configdict["defaults"].has_key("ARCH"): |
2077 |
if self.configdict["defaults"].has_key("ARCH"): |