1 |
This corrects a problem triggered with USE defaults where repoman |
2 |
returns an incorrect negative match for an atom with USE defaults. |
3 |
For example, it triggered this dependency.bad error: |
4 |
|
5 |
RepoMan scours the neighborhood... |
6 |
dependency.bad [fatal] 2 |
7 |
dev-libs/libxml2/libxml2-2.9.9-r1.ebuild: DEPEND: ~riscv(default/linux/riscv/17.0/rv64gc) |
8 |
[ '>=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)]'] |
9 |
dev-libs/libxml2/libxml2-2.9.9-r1.ebuild: RDEPEND: ~riscv(default/linux/riscv/17.0/rv64gc) |
10 |
[ '>=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)]'] |
11 |
|
12 |
State in the _match_use method looked like this: |
13 |
|
14 |
(Pdb) atom |
15 |
'>=dev-lang/python-exec-2:=[python_targets_python3_7(-),-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)]' |
16 |
(Pdb) useforce |
17 |
frozenset({'python_targets_pypy', 'python_targets_pypy3', 'python_targets_python3_5', 'big-endian', 'userland_GNU', 'python_targets_python3_7', 'riscv', 'python_single_target_python3_7', 'python_targets_python2_7', 'elibc_glibc', 'python_targets_python3_6', 'abi_riscv_lp64d', 'kernel_linux', 'python_targets_jython2_7'}) |
18 |
(Pdb) atom.use.disabled |
19 |
frozenset({'python_single_target_python3_6', 'python_single_target_python2_7', 'python_single_target_python3_7', 'python_single_target_python3_5'}) |
20 |
(Pdb) atom.use.missing_disabled |
21 |
frozenset({'python_single_target_python2_7', 'python_targets_python3_5', 'python_targets_python3_7', 'python_single_target_python3_5', 'python_single_target_python3_7', 'python_targets_python2_7', 'python_targets_python3_6', 'python_single_target_python3_6'}) |
22 |
|
23 |
Bug: https://bugs.gentoo.org/685482 |
24 |
Signed-off-by: Zac Medico <zmedico@g.o> |
25 |
--- |
26 |
lib/portage/dbapi/__init__.py | 4 ++-- |
27 |
1 file changed, 2 insertions(+), 2 deletions(-) |
28 |
|
29 |
diff --git a/lib/portage/dbapi/__init__.py b/lib/portage/dbapi/__init__.py |
30 |
index 6fca6090c..80f8a689f 100644 |
31 |
--- a/lib/portage/dbapi/__init__.py |
32 |
+++ b/lib/portage/dbapi/__init__.py |
33 |
@@ -314,12 +314,12 @@ class dbapi(object): |
34 |
# Check masked and forced flags for repoman. |
35 |
usemask = self.settings._getUseMask(pkg, |
36 |
stable=self.settings._parent_stable) |
37 |
- if any(x in usemask for x in atom.use.enabled): |
38 |
+ if any(x in usemask and iuse.get_real_flag(x) is not None for x in atom.use.enabled): |
39 |
return False |
40 |
|
41 |
useforce = self.settings._getUseForce(pkg, |
42 |
stable=self.settings._parent_stable) |
43 |
- if any(x in useforce and x not in usemask |
44 |
+ if any(x in useforce and x not in usemask and iuse.get_real_flag(x) is not None |
45 |
for x in atom.use.disabled): |
46 |
return False |
47 |
|
48 |
-- |
49 |
2.21.0 |