On Wed, 2021-12-08 at 22:59 +0100, Alexander Kanavin wrote:
> Signed-off-by: Alexander Kanavin <a...@linutronix.de>
> ---
>  meta/classes/insane.bbclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 240f3aad62..8a47da5a09 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -1176,7 +1176,9 @@ python do_qa_patch() {
>         (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
>  
>         # skip patches not in oe-core
> -       if '/meta/' not in fullpath:
> +       oecore_re = re.compile(d.getVar('BBFILE_PATTERN_core'))
> +       match_oecore = oecore_re.search(fullpath)
> +       if not match_oecore:
>             continue
>  
>         content = open(fullpath, encoding='utf-8', errors='ignore').read()

Sorry about the miscommunication on this. I believed this patch would break
things and that the sstate tests should have spotted it. They didn't as the test
case doesn't quite cover this issue but there is a real problem here even though
they pass.

You can see the problem if you run:

$ bitbake bash -c patch

then

$ bitbake-dumpsig tmp/stamps/XXX-poky-linux/bash/5.1.8-r0.do_patch.sigdata.XXX* 
| grep BBFILE_PATTERN

and you see your build path to the metadata exposed:

Variable BBFILE_PATTERN_core value is ^/media/build1/poky/meta/

which means the hashes just became metadata path specific. We can't do that.

I've realised the sstate tests don't pick this up since the metadata is in a
fixed location for the tests so it doesn't change. As well as fixing this patch,
we should revise the sstate sigs tests to test for changes in metadata path
changing the sigs.

Cheers,

Richard




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159446): 
https://lists.openembedded.org/g/openembedded-core/message/159446
Mute This Topic: https://lists.openembedded.org/mt/87599626/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to