1 |
On 05/21/2016 11:56 PM, Michał Górny wrote: |
2 |
> diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
3 |
> index 45b7d08..fcc7ce5 100644 |
4 |
> --- a/pym/portage/package/ebuild/config.py |
5 |
> +++ b/pym/portage/package/ebuild/config.py |
6 |
> @@ -1773,6 +1773,16 @@ class config(object): |
7 |
> # setcpv triggers lazy instantiation of things like _use_manager. |
8 |
> _eapi_cache.clear() |
9 |
> |
10 |
> + # Prepare the final value of INSTALL_MASK |
11 |
> + install_mask = self["INSTALL_MASK"].split() |
12 |
> + if 'nodoc' in self.features: |
13 |
> + install_mask.append("/usr/share/doc") |
14 |
> + if 'noinfo' in self.features: |
15 |
> + install_mask.append("/usr/share/info") |
16 |
> + if 'noman' in self.features: |
17 |
> + install_mask.append("/usr/share/man") |
18 |
> + self["INSTALL_MASK"] = ' '.join(install_mask) |
19 |
> + |
20 |
> def _grab_pkg_env(self, penv, container, protected_keys=None): |
21 |
> if protected_keys is None: |
22 |
> protected_keys = () |
23 |
> |
24 |
|
25 |
I'm concerned that these values can be appended more than once, causing |
26 |
the variable to contain duplicate values, because setcpv only calls |
27 |
reset when the has_changed variable is True. So, we only want to call |
28 |
this code when has_changed is True. In fact, this code can go |
29 |
immediately after the reset call here: |
30 |
|
31 |
if has_changed: |
32 |
self.reset(keeping_pkg=1) |
33 |
-- |
34 |
Thanks, |
35 |
Zac |