[OE-core] [PATCH 1/1] stress-ng: Add bash to DEPENDS

Richard Purdie richard.purdie at linuxfoundation.org
Tue Aug 6 14:16:34 UTC 2019


On Tue, 2019-08-06 at 16:05 +0200, Alexander Kanavin wrote:
> On Tue, 6 Aug 2019 at 15:22, Alexander Kanavin <
> alex.kanavin at gmail.com> wrote:
> > I think the issue might be actually in the QA check where it looks
> > beyond the recipe's immediate RDEPENDS (and then fails or not
> > depending on whether those indirect dependencies have been
> > packaged). I need to better understand what happens there so will
> > add some printouts first. The problem does happen with latest
> > master.
> > 
> 
> I can confirm that this bit in insane.bbclass is non-deterministic:
> 
>                 # Find all the rdepends on the dependency chain
>                 while next:
>                     new = []
>                     for rdep in next:
>                         rdep_data =
> oe.packagedata.read_subpkgdata(rdep, d)
>                         sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
>                         if not sub_rdeps:
>                             continue
>                         for sub_rdep in
> bb.utils.explode_deps(sub_rdeps):
>                             if sub_rdep in done:
>                                 continue
>                             if
> oe.packagedata.has_subpkgdata(sub_rdep, d):
>                                 # It's a new rdep
>                                 done.append(sub_rdep)
>                                 new.append(sub_rdep)
>                     next = new
> 
> It only fully expands the dependencies if all of them have been
> already packaged. As there is no mechanism to ensure that package_qa
> runs after packaging all of the recursive RDEPENDS, this is causing a
> race between packaging them, and running the package qa check.
>
> I think the right way to address this is to actually drop the
> recursive RDEPENDS resolution, and only consider the immediate
> runtime dependencies. Alternatively, we may introduce additional task
> dependencies to fix the race. Thoughts?

I partly agree with this. There is:

insane.bbclass:do_package_qa[rdeptask] = "do_packagedata"

which does help the situation by forcing package_qa after all the
runtime dependencies.

I suspect the real problem is that it can also see RDEPENDS for things
it doesn't rdepend upon...

You might want package_prepare_pkgdata() from package_pkgdata called
for package_qa's context on a separate directory, then to use that as
the pkgdata to resolve against?

Note that package_prepare_pkgdata() called for do_package is different
than package_prepare_pkgdata() called for do_package_qa as the tasks
have different dependencies...

Cheers,

Richard









More information about the Openembedded-core mailing list