1 |
On Fri, 2 Dec 2016 22:07:39 -0800 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> Ensure that config adjustments are applied to all relevant |
5 |
> config instances, in order to prevent inconsistencies like |
6 |
> the one that triggered bug 601466. |
7 |
> |
8 |
> X-Gentoo-Bug: 601466 |
9 |
> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=601466 |
10 |
> --- |
11 |
> bin/ebuild | 23 ++++++++++++++++------- |
12 |
> 1 file changed, 16 insertions(+), 7 deletions(-) |
13 |
> |
14 |
> diff --git a/bin/ebuild b/bin/ebuild |
15 |
> index 1f99177..e8b8bae 100755 |
16 |
> --- a/bin/ebuild |
17 |
> +++ b/bin/ebuild |
18 |
> @@ -244,7 +244,11 @@ if mytree == "porttree" and |
19 |
> build_dir_phases.intersection(pargs): ebuild_changed = \ |
20 |
> portage.portdb._pull_valid_cache(cpv, ebuild, |
21 |
> ebuild_portdir)[0] is None |
22 |
> -tmpsettings = portage.config(clone=portage.settings) |
23 |
> +# Make configuration adjustments to portage.portdb.doebuild_settings, |
24 |
> +# in order to enforce consistency for EBUILD_FORCE_TEST support |
25 |
> +# (see bug 601466). |
26 |
> +tmpsettings = portage.portdb.doebuild_settings |
27 |
> + |
28 |
> tmpsettings["PORTAGE_VERBOSE"] = "1" |
29 |
> tmpsettings.backup_changes("PORTAGE_VERBOSE") |
30 |
> |
31 |
> @@ -272,6 +276,17 @@ if "merge" in pargs and "noauto" in |
32 |
> tmpsettings.features: print("Disabling noauto in features... merge |
33 |
> disables it. (qmerge doesn't)") tmpsettings.features.discard("noauto") |
34 |
> |
35 |
> +if 'digest' in tmpsettings.features: |
36 |
> + if pargs and pargs[0] not in ("digest", "manifest"): |
37 |
> + pargs = ['digest'] + pargs |
38 |
> + # We only need to build digests on the first pass. |
39 |
> + tmpsettings.features.discard('digest') |
40 |
> + |
41 |
> +# Now that configuration adjustments are complete, create a clone of |
42 |
> +# tmpsettings. The current instance refers to |
43 |
> portdb.doebuild_settings, +# and we want to avoid the possibility of |
44 |
> unintended side-effects. +tmpsettings = |
45 |
> portage.config(clone=tmpsettings) + |
46 |
> try: |
47 |
> metadata = dict(zip(Package.metadata_keys, |
48 |
> portage.db[portage.settings['EROOT']][mytree].dbapi.aux_get( |
49 |
> @@ -315,12 +330,6 @@ def stale_env_warning(): |
50 |
> open(os.path.join(tmpsettings['PORTAGE_BUILDDIR'], |
51 |
> '.ebuild_changed'), |
52 |
> 'w').close() |
53 |
> -if 'digest' in tmpsettings.features: |
54 |
> - if pargs and pargs[0] not in ("digest", "manifest"): |
55 |
> - pargs = ['digest'] + pargs |
56 |
> - # We only need to build digests on the first pass. |
57 |
> - tmpsettings.features.discard('digest') |
58 |
> - |
59 |
> checked_for_stale_env = False |
60 |
> |
61 |
> for arg in pargs: |
62 |
|
63 |
looks fine to me |
64 |
|
65 |
-- |
66 |
Brian Dolbec <dolsen> |