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