Re: How to *properly* use SSTATE_DUPWHITELIST?


Robert P. J. Day
 

Quoting "Robert P. J. Day" <rpjday@crashcourse.ca>:

Never had cause to dig into SSTATE_DUPWHITELIST until now,
so a couple questions. (Side Note: This variable is not listed
in the YP Reference Manual variable glossary -- should it be?)

Ran across this as current project incorporates recipes
grpc-python and python-grpcio, which is problematic as the
latter is simply the renamed version of the former so, yeah,
that's definitely going to generate a ton of file install
conflicts.

The solution selected (and, yes, I know this is tacky and
gross and this should be fixed the right way) was to add
the line:

SSTATE_DUPWHITELIST = "/"

to python-grpcio.inc, which *seemed* to fix the problem,
until I started playing this morning to clarify what different
variations of this solution would do.

First oddity was that, after I added or deleted that line,
it seemed it made no difference in the rebuild of the
incorporating image, until I noticed this in
sstate.bbclass:

sstate_install[vardepsexclude] += "SSTATE_DUPWHITELIST ..."

which suggests that the sstate doesn't check dependency
based on SSTATE_DUPWHITELIST, so to get the change to kick in,
I did a "bitbake -c cleanall ..." on those recipes first,
and that seemed to do it.

But even that showed some weirdly non-deterministic behaviour,
as there seemed to be a difference based on which recipe I
added that line to, and which recipe I cleaned. So the
obvious question is, if I have two recipes that clash in
terms of installed files like these two, does one add that
line to either or both of the recipes? What does it mean to
add it to only one, and if that happens (as it did here),
how does that affect the eventual install? Does ordering then
matter?

In a general case, if I have, say, 5 recipes all of which
clash in the same place, do I add that line to all 5 recipes?
And if I don't, do I get undefined behaviour?
Oh, wait, I think I misunderstood this variable entirely --
it's not a per-recipe variable, is it? Its value represents the
combination over all recipes in the image, is that right? So
by adding the line:

SSTATE_DUPWHITELIST = "/"

I've effectively de-activated file conflict errors across the
entire rootfs and all recipes in the image, do I have that right?

rday

Join yocto@lists.yoctoproject.org to automatically receive all group messages.