insane.bbclass: do not hardcode oe-core path in upstream-status check

Message ID 20211124092521.1077244-1-alex@linutronix.de
State New
Headers show
Series insane.bbclass: do not hardcode oe-core path in upstream-status check | expand

Commit Message

Alexander Kanavin Nov. 24, 2021, 9:25 a.m. UTC
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/classes/insane.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Richard Purdie Nov. 24, 2021, 9:40 a.m. UTC | #1
On Wed, 2021-11-24 at 10:25 +0100, Alexander Kanavin wrote:
> Signed-off-by: Alexander Kanavin <alex@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
>  

Does this pass the sstate tests? I have a feeling it may encode a path into the
sstate checksums :/

Cheers,

Richard
Alexander Kanavin Nov. 24, 2021, 11:41 a.m. UTC | #2
On Wed, 24 Nov 2021 at 10:40, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> >         # 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
> >
>
> Does this pass the sstate tests? I have a feeling it may encode a path
> into the
> sstate checksums :/
>

I just ran 'oe-selftest -r sstatetests' with this and they all passed.

Alex

Patch

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()