public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps
  @ 2020-03-11 23:32 99%     ` Matt Turner
  0 siblings, 0 replies; 1+ results
From: Matt Turner @ 2020-03-11 23:32 UTC (permalink / raw
  To: Zac Medico; +Cc: gentoo-portage-dev

On Tue, Mar 10, 2020 at 8:30 PM Zac Medico <zmedico@gentoo.org> wrote:
>
> On 3/6/20 10:11 PM, Matt Turner wrote:
> > +def _deps_equal(deps_a, deps_b, eapi, uselist=None):
> > +     """Compare two dependency lists given a set of USE flags"""
> > +     if deps_a == deps_b: return True
> > +
> > +     deps_a = use_reduce(deps_a, uselist=uselist, eapi=eapi, token_class=Atom)
> > +     deps_b = use_reduce(deps_b, uselist=uselist, eapi=eapi, token_class=Atom)
>
> It's pure luck that passing a list of depstrings to use_reduce works
> here, so it will be more future-proof to use ' '.join(depstr) instead.
> The relevant code in use_reduce looks like this:
>
> if isinstance(depstr, list):
>         if portage._internal_caller:
>                 warnings.warn(_("Passing paren_reduced dep arrays to %s is deprecated. " + \
>                         "Pass the original dep string instead.") % \
>                         ('portage.dep.use_reduce',), DeprecationWarning, stacklevel=2)
>         depstr = paren_enclose(depstr)

Okay, thank you. I've fixed this with:

- binpkg_deps = bin_dbapi.aux_get(cpv, keys)
- ebuild_deps = port_dbapi.aux_get(cpv, keys)
+ binpkg_deps = ' '.join(bin_dbapi.aux_get(cpv, keys))
+ ebuild_deps = ' '.join(port_dbapi.aux_get(cpv, keys))

With that fixed, do the patches look good to you?


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-03-07  6:11     [gentoo-portage-dev] [PATCH v2 gentoolkit 1/2] eclean: Rewrite findPackages() Matt Turner
2020-03-07  6:11     ` [gentoo-portage-dev] [PATCH v2 gentoolkit 2/2] eclean: Add option to delete binpkgs with changed deps Matt Turner
2020-03-11  3:30       ` Zac Medico
2020-03-11 23:32 99%     ` Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox