1 |
Signed-off-by: Aaron Bauman <bman@g.o> |
2 |
--- |
3 |
lib/portage/dep/__init__.py | 32 ++++++++++++++++---------------- |
4 |
1 file changed, 16 insertions(+), 16 deletions(-) |
5 |
|
6 |
diff --git a/lib/portage/dep/__init__.py b/lib/portage/dep/__init__.py |
7 |
index 36f0dc8c9..50266a21b 100644 |
8 |
--- a/lib/portage/dep/__init__.py |
9 |
+++ b/lib/portage/dep/__init__.py |
10 |
@@ -1,5 +1,5 @@ |
11 |
# deps.py -- Portage dependency resolution functions |
12 |
-# Copyright 2003-2018 Gentoo Foundation |
13 |
+# Copyright 2003-2020 Gentoo Authors |
14 |
# Distributed under the terms of the GNU General Public License v2 |
15 |
|
16 |
__all__ = [ |
17 |
@@ -9,7 +9,7 @@ __all__ = [ |
18 |
'get_operator', 'isjustname', 'isspecific', |
19 |
'isvalidatom', 'match_from_list', 'match_to_list', |
20 |
'paren_enclose', 'paren_normalize', 'paren_reduce', |
21 |
- 'remove_slot', 'strip_empty', 'use_reduce', |
22 |
+ 'remove_slot', 'strip_empty', 'use_reduce', |
23 |
'_repo_separator', '_slot_separator', |
24 |
] |
25 |
|
26 |
@@ -93,7 +93,7 @@ def _get_atom_re(eapi_attrs): |
27 |
atom_re = re.compile('^(?P<without_use>(?:' + |
28 |
'(?P<op>' + _op + cpv_re + ')|' + |
29 |
'(?P<star>=' + cpv_re + r'\*)|' + |
30 |
- '(?P<simple>' + cp_re + '))' + |
31 |
+ '(?P<simple>' + cp_re + '))' + |
32 |
'(' + _slot_separator + _slot_loose + ')?' + |
33 |
_repo + ')(' + _use + ')?$', re.VERBOSE | re.UNICODE) |
34 |
|
35 |
@@ -281,7 +281,7 @@ def paren_reduce(mystr, _deprecation_warn=True): |
36 |
stack[level].extend(l[0]) |
37 |
else: |
38 |
stack[level].extend(l) |
39 |
- else: |
40 |
+ else: |
41 |
stack[level].append(l) |
42 |
|
43 |
if l: |
44 |
@@ -322,13 +322,13 @@ def paren_reduce(mystr, _deprecation_warn=True): |
45 |
|
46 |
if token[-1] == "?": |
47 |
need_bracket = True |
48 |
- |
49 |
+ |
50 |
stack[level].append(token) |
51 |
|
52 |
if level != 0 or need_bracket: |
53 |
raise InvalidDependString( |
54 |
_("malformed syntax: '%s'") % mystr) |
55 |
- |
56 |
+ |
57 |
return stack[0] |
58 |
|
59 |
class paren_normalize(list): |
60 |
@@ -420,7 +420,7 @@ def _use_reduce_cached(depstr, uselist, masklist, matchall, excludeall, \ |
61 |
else: |
62 |
flag = conditional[:-1] |
63 |
is_negated = False |
64 |
- |
65 |
+ |
66 |
if is_valid_flag: |
67 |
if not is_valid_flag(flag): |
68 |
msg = _("USE flag '%s' referenced in " + \ |
69 |
@@ -669,7 +669,7 @@ def _use_reduce_cached(depstr, uselist, masklist, matchall, excludeall, \ |
70 |
raise InvalidDependString( |
71 |
_("SRC_URI arrow not allowed in EAPI %s: token %s") % (eapi, pos+1)) |
72 |
need_simple_token = True |
73 |
- stack[level].append(token) |
74 |
+ stack[level].append(token) |
75 |
else: |
76 |
if need_bracket: |
77 |
raise InvalidDependString( |
78 |
@@ -710,11 +710,11 @@ def _use_reduce_cached(depstr, uselist, masklist, matchall, excludeall, \ |
79 |
if level != 0: |
80 |
raise InvalidDependString( |
81 |
_("Missing '%s' at end of string") % (")",)) |
82 |
- |
83 |
+ |
84 |
if need_bracket: |
85 |
raise InvalidDependString( |
86 |
_("Missing '%s' at end of string") % ("(",)) |
87 |
- |
88 |
+ |
89 |
if need_simple_token: |
90 |
raise InvalidDependString( |
91 |
_("Missing file name at end of string")) |
92 |
@@ -1054,7 +1054,7 @@ class _use_dep: |
93 |
tokens = [] |
94 |
|
95 |
all_defaults = self.missing_enabled | self.missing_disabled |
96 |
- |
97 |
+ |
98 |
def validate_flag(flag): |
99 |
return is_valid_flag(flag) or flag in all_defaults |
100 |
|
101 |
@@ -1823,7 +1823,7 @@ def dep_getslot(mydep): |
102 |
|
103 |
#remove repo_name if present |
104 |
mydep = mydep.split(_repo_separator)[0] |
105 |
- |
106 |
+ |
107 |
colon = mydep.find(_slot_separator) |
108 |
if colon != -1: |
109 |
bracket = mydep.find("[", colon) |
110 |
@@ -2249,7 +2249,7 @@ def match_from_list(mydep, candidate_list): |
111 |
|
112 |
elif operator == "=*": # glob match |
113 |
# XXX: Nasty special casing for leading zeros |
114 |
- # Required as =* is a literal prefix match, so can't |
115 |
+ # Required as =* is a literal prefix match, so can't |
116 |
# use vercmp |
117 |
myver = mycpv_cps[2].lstrip("0") |
118 |
if not myver or not myver[0].isdigit(): |
119 |
@@ -2495,7 +2495,7 @@ def get_required_use_flags(required_use, eapi=None): |
120 |
stack[level].append(token) |
121 |
else: |
122 |
stack[level].append(True) |
123 |
- |
124 |
+ |
125 |
register_token(token) |
126 |
|
127 |
if level != 0 or need_bracket: |
128 |
@@ -2603,7 +2603,7 @@ def check_required_use(required_use, use, iuse_match, eapi=None): |
129 |
|
130 |
return (flag in use and not is_negated) or \ |
131 |
(flag not in use and is_negated) |
132 |
- |
133 |
+ |
134 |
def is_satisfied(operator, argument): |
135 |
if not argument and eapi_attrs.empty_groups_always_true: |
136 |
#|| ( ) -> True |
137 |
@@ -2812,7 +2812,7 @@ def extract_affecting_use(mystr, atom, eapi=None): |
138 |
stack[level].extend(l[0]) |
139 |
else: |
140 |
stack[level].extend(l) |
141 |
- else: |
142 |
+ else: |
143 |
stack[level].append(l) |
144 |
|
145 |
if l: |
146 |
-- |
147 |
2.28.0 |