Lines 1860-1885
Link Here
|
1860 |
else: |
1860 |
else: |
1861 |
self.configdict["auto"]["USE"] = "" |
1861 |
self.configdict["auto"]["USE"] = "" |
1862 |
|
1862 |
|
1863 |
use_expand_protected = [] |
|
|
1864 |
use_expand = self.get("USE_EXPAND", "").split() |
1863 |
use_expand = self.get("USE_EXPAND", "").split() |
1865 |
for var in use_expand: |
|
|
1866 |
var_lower = var.lower() |
1867 |
for x in self.get(var, "").split(): |
1868 |
# Any incremental USE_EXPAND variables have already been |
1869 |
# processed, so leading +/- operators are invalid here. |
1870 |
if x[0] == "+": |
1871 |
writemsg(colorize("BAD", "Invalid '+' operator in " + \ |
1872 |
"non-incremental variable '%s': '%s'\n" % (var, x)), |
1873 |
noiselevel=-1) |
1874 |
x = x[1:] |
1875 |
if x[0] == "-": |
1876 |
writemsg(colorize("BAD", "Invalid '-' operator in " + \ |
1877 |
"non-incremental variable '%s': '%s'\n" % (var, x)), |
1878 |
noiselevel=-1) |
1879 |
continue |
1880 |
mystr = var_lower + "_" + x |
1881 |
if mystr not in use_expand_protected: |
1882 |
use_expand_protected.append(mystr) |
1883 |
|
1864 |
|
1884 |
if not self.uvlist: |
1865 |
if not self.uvlist: |
1885 |
for x in self["USE_ORDER"].split(":"): |
1866 |
for x in self["USE_ORDER"].split(":"): |
Lines 1887-1897
Link Here
|
1887 |
self.uvlist.append(self.configdict[x]) |
1868 |
self.uvlist.append(self.configdict[x]) |
1888 |
self.uvlist.reverse() |
1869 |
self.uvlist.reverse() |
1889 |
|
1870 |
|
1890 |
myflags = use_expand_protected[:] |
1871 |
myflags = [] |
1891 |
for curdb in self.uvlist: |
1872 |
for curdb in self.uvlist: |
1892 |
if "USE" not in curdb: |
1873 |
cur_use_expand = [x for x in use_expand if x in curdb] |
|
|
1874 |
mysplit = curdb.get("USE", "").split() |
1875 |
if not mysplit and not cur_use_expand: |
1893 |
continue |
1876 |
continue |
1894 |
mysplit = curdb["USE"].split() |
|
|
1895 |
for x in mysplit: |
1877 |
for x in mysplit: |
1896 |
if x == "-*": |
1878 |
if x == "-*": |
1897 |
myflags = [] |
1879 |
myflags = [] |
Lines 1911-1919
Link Here
|
1911 |
pass |
1893 |
pass |
1912 |
continue |
1894 |
continue |
1913 |
|
1895 |
|
1914 |
if x not in myflags: |
1896 |
myflags.append(x) |
1915 |
myflags.append(x) |
|
|
1916 |
|
1897 |
|
|
|
1898 |
for var in cur_use_expand: |
1899 |
var_lower = var.lower() |
1900 |
if var not in myincrementals: |
1901 |
prefix = var_lower + "_" |
1902 |
myflags = [x for x in myflags if not x.startswith(prefix)] |
1903 |
for x in curdb[var].split(): |
1904 |
# Any incremental USE_EXPAND variables have already been |
1905 |
# processed, so leading +/- operators are invalid here. |
1906 |
if x[0] == "+": |
1907 |
writemsg(colorize("BAD", "Invalid '+' operator in " + \ |
1908 |
"non-incremental variable '%s': '%s'\n" % (var, x)), |
1909 |
noiselevel=-1) |
1910 |
x = x[1:] |
1911 |
if x[0] == "-": |
1912 |
writemsg(colorize("BAD", "Invalid '-' operator in " + \ |
1913 |
"non-incremental variable '%s': '%s'\n" % (var, x)), |
1914 |
noiselevel=-1) |
1915 |
continue |
1916 |
myflags.append(var_lower + "_" + x) |
1917 |
|
1917 |
myflags = set(myflags) |
1918 |
myflags = set(myflags) |
1918 |
myflags.update(self.useforce) |
1919 |
myflags.update(self.useforce) |
1919 |
|
1920 |
|