1 |
On Thu, 12 Jul 2018 02:59:03 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> Account for repoman modifications of the portdbapi self.settings |
5 |
> reference, and treat all flags as valid for the empty profile |
6 |
> because it does not have any implicit IUSE settings. |
7 |
> |
8 |
> Bug: https://bugs.gentoo.org/660982 |
9 |
> --- |
10 |
> pym/_emerge/Package.py | 5 ++++- |
11 |
> pym/portage/dbapi/__init__.py | 16 ++++++++++++++++ |
12 |
> 2 files changed, 20 insertions(+), 1 deletion(-) |
13 |
> |
14 |
> diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py |
15 |
> index a7ce00bc9..5f34f3d27 100644 |
16 |
> --- a/pym/_emerge/Package.py |
17 |
> +++ b/pym/_emerge/Package.py |
18 |
> @@ -93,7 +93,10 @@ class Package(Task): |
19 |
> # sync metadata with validated repo (may be |
20 |
> UNKNOWN_REPO) self._metadata['repository'] = self.cpv.repo |
21 |
> |
22 |
> - implicit_match = db._iuse_implicit_cnstr(self.cpv, |
23 |
> self._metadata) |
24 |
> + if self.root_config.settings.local_config: |
25 |
> + implicit_match = |
26 |
> db._iuse_implicit_cnstr(self.cpv, self._metadata) |
27 |
> + else: |
28 |
> + implicit_match = |
29 |
> db._repoman_iuse_implicit_cnstr(self.cpv, self._metadata) usealiases |
30 |
> = self.root_config.settings._use_manager.getUseAliases(self) |
31 |
> self.iuse = self._iuse(self, self._metadata["IUSE"].split(), |
32 |
> implicit_match, usealiases, self.eapi) diff --git |
33 |
> a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index |
34 |
> d320cc75f..61d301839 100644 --- a/pym/portage/dbapi/__init__.py |
35 |
> +++ b/pym/portage/dbapi/__init__.py |
36 |
> @@ -216,6 +216,22 @@ class dbapi(object): |
37 |
> |
38 |
> yield cpv |
39 |
> |
40 |
> + def _repoman_iuse_implicit_cnstr(self, pkg, metadata): |
41 |
> + """ |
42 |
> + In repoman's version of _iuse_implicit_cnstr, |
43 |
> account for modifications |
44 |
> + of the self.settings reference between calls, and |
45 |
> treat all flags as |
46 |
> + valid for the empty profile because it does not have |
47 |
> any implicit IUSE |
48 |
> + settings. See bug 660982. |
49 |
> + """ |
50 |
> + eapi_attrs = _get_eapi_attrs(metadata["EAPI"]) |
51 |
> + if eapi_attrs.iuse_effective: |
52 |
> + iuse_implicit_match = lambda flag: (True if |
53 |
> not self.settings.profile_path |
54 |
> + else |
55 |
> self.settings._iuse_effective_match(flag)) |
56 |
> + else: |
57 |
> + iuse_implicit_match = lambda flag: (True if |
58 |
> not self.settings.profile_path |
59 |
> + else |
60 |
> self.settings._iuse_implicit_match(flag)) |
61 |
> + return iuse_implicit_match |
62 |
> + |
63 |
> def _iuse_implicit_cnstr(self, pkg, metadata): |
64 |
> """ |
65 |
> Construct a callable that checks if a given USE flag |
66 |
> should |
67 |
|
68 |
looks good thanks. |
69 |
|
70 |
Please add the test case ebuild that was supplied to the repoman |
71 |
gen-b0rk repo "not-broken" category. |
72 |
|
73 |
https://gitweb.gentoo.org/repo/proj/gen-b0rk.git/ |
74 |
|
75 |
-- |
76 |
Brian Dolbec <dolsen> |