1 |
On Sun, Mar 1, 2020 at 10:39 PM Zac Medico <zmedico@g.o> wrote: |
2 |
> |
3 |
> On 2/20/20 9:29 PM, Matt Turner wrote: |
4 |
> > @@ -564,7 +577,22 @@ def findPackages( |
5 |
> > |
6 |
> > # Exclude if binpkg exists in the porttree and not --deep |
7 |
> > if not destructive and port_dbapi.cpv_exists(cpv): |
8 |
> > - continue |
9 |
> > + if not options['changed-deps']: |
10 |
> > + continue |
11 |
> > + |
12 |
> > + uselist = bin_dbapi.aux_get(cpv, ['USE'])[0].split() |
13 |
> > + all_equal = True |
14 |
> > + |
15 |
> > + for k in ('RDEPEND', 'PDEPEND'): |
16 |
> > + binpkg_deps = bin_dbapi.aux_get(cpv, [k]) |
17 |
> > + ebuild_deps = port_dbapi.aux_get(cpv, [k]) |
18 |
> > + |
19 |
> > + if not _deps_equal(binpkg_deps, ebuild_deps, cpv.eapi, uselist): |
20 |
> > + all_equal = False |
21 |
> > + break |
22 |
> > + |
23 |
> > + if all_equal: |
24 |
> > + continue |
25 |
> |
26 |
> If all_equal is True, then none of the other filters have an opportunity |
27 |
> to add this package to the dead_binpkgs set. That's not good is it? |
28 |
|
29 |
There are four cases we skip including packages: 1) exclude list, 2) |
30 |
time limit, 3) non-destructive and package still exists (and now |
31 |
optionally runtime deps haven't changed), 4) destructive and package |
32 |
is installed. Cases (3) and (4) are non-overlapping. |
33 |
|
34 |
If none of those cases are true, then we add the package to the |
35 |
dead_binpkgs set. The logic looks right to me. |
36 |
|
37 |
Maybe I'm not understanding. |
38 |
|
39 |
With your other suggestion in place, the code looks like this, which |
40 |
is hopefully clearer. |
41 |
|
42 |
# Exclude if binpkg exists in the porttree and not --deep |
43 |
if not destructive and port_dbapi.cpv_exists(cpv): |
44 |
if not options['changed-deps']: |
45 |
continue |
46 |
|
47 |
keys = ('RDEPEND', 'PDEPEND') |
48 |
binpkg_deps = bin_dbapi.aux_get(cpv, keys) |
49 |
ebuild_deps = port_dbapi.aux_get(cpv, keys) |
50 |
uselist = bin_dbapi.aux_get(cpv, ['USE'])[0].split() |
51 |
|
52 |
if _deps_equal(binpkg_deps, ebuild_deps, cpv.eapi, uselist): |
53 |
continue |
54 |
|
55 |
Unfortunately I don't have any packages with changed-deps at the |
56 |
moment for testing :( |