1 |
On 2/20/20 9:29 PM, Matt Turner wrote: |
2 |
> + |
3 |
> def findPackages( |
4 |
> options, |
5 |
> exclude=None, |
6 |
> @@ -564,7 +577,22 @@ def findPackages( |
7 |
> |
8 |
> # Exclude if binpkg exists in the porttree and not --deep |
9 |
> if not destructive and port_dbapi.cpv_exists(cpv): |
10 |
> - continue |
11 |
> + if not options['changed-deps']: |
12 |
> + continue |
13 |
> + |
14 |
> + uselist = bin_dbapi.aux_get(cpv, ['USE'])[0].split() |
15 |
> + all_equal = True |
16 |
> + |
17 |
> + for k in ('RDEPEND', 'PDEPEND'): |
18 |
> + binpkg_deps = bin_dbapi.aux_get(cpv, [k]) |
19 |
> + ebuild_deps = port_dbapi.aux_get(cpv, [k]) |
20 |
> + |
21 |
> + if not _deps_equal(binpkg_deps, ebuild_deps, cpv.eapi, uselist): |
22 |
> + all_equal = False |
23 |
> + break |
24 |
> + |
25 |
> + if all_equal: |
26 |
> + continue |
27 |
> |
28 |
> if destructive and var_dbapi.cpv_exists(cpv): |
29 |
> # Exclude if an instance of the package is installed due to |
30 |
> |
31 |
|
32 |
The aux_get calls are expensive, so it's more efficient to get multiple |
33 |
values with each call like: |
34 |
keys = ('RDEPEND', 'PDEPEND') |
35 |
binpkg_deps = dict(zip(keys, bin_dbapi.aux_get(cpv, keys)) |
36 |
ebuild_deps = dict(zip(keys, port_dbapi.aux_get(cpv, keys)) |
37 |
|
38 |
Otherwise, looks good. |
39 |
-- |
40 |
Thanks, |
41 |
Zac |