Skip to contentSkip to conversation

insane.bbclass: Skip patches not in oe-core by full path

PATCH Superseded Yang Xu 2 participants 3 messages Aug 15, 2022 – Aug 19, 2022

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yang Xu

author
#0 lore raw

PATCH v2 1/1 insane.bbclass: Skip patches not in oe-core by full path

The full path of patch may contain '/meta/' but not in oe-core, skip patches by checking it starts with oe-core full path or not.

---
 meta/classes-global/insane.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-global/insane.bbclass +2 -1
index 46ea41e271..42daf4388e 100644
@@ -1214,11 +1214,12 @@ python do_qa_patch() {
     import re
     from oe import patch
 
+    coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta/')
     for url in patch.src_patches(d):
        (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
 
        # skip patches not in oe-core
-       if '/meta/' not in fullpath:
+       if not os.path.abspath(fullpath).startswith(os.path.abspath(coremeta_path)):
            continue
 
        kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE)
Signature · 1 line
2.25.1
#1 lore raw

Hello,

This doesn't seem to work as expected:

https://autobuilder.yoctoproject.org/typhoon/#/builders/120/builds/1599/steps/12/logs/stdio

https://autobuilder.yoctoproject.org/typhoon/#/builders/100/builds/3296/steps/12/logs/stdio

https://autobuilder.yoctoproject.org/typhoon/#builders/128/builds/495/steps/13/logs/stdio

Quoted 39 lines · Yang Xu via lists.openembedded.org

The full path of patch may contain '/meta/' but not in oe-core, skip patches by checking it starts with oe-core full path or not.

---
 meta/classes-global/insane.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-global/insane.bbclass +2 -1
index 46ea41e271..42daf4388e 100644
@@ -1214,11 +1214,12 @@ python do_qa_patch() {
     import re
     from oe import patch
 
+    coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta/')
     for url in patch.src_patches(d):
        (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
 
        # skip patches not in oe-core
-       if '/meta/' not in fullpath:
+       if not os.path.abspath(fullpath).startswith(os.path.abspath(coremeta_path)):
            continue
 
        kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE)
Signature · 11 lines
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169350): https://lists.openembedded.org/g/openembedded-core/message/169350
Mute This Topic: https://lists.openembedded.org/mt/93030817/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#2 lore raw

Hi Alexandre,

Sorry for my neglience. Error caused by the last "/" was eaten by os.path.abspath.

I have fixed and submitted PATCH v3.

Thank you

Quoted 5 lines · Alexandre Belloni

Hello,

This doesn't seem to work as expected:

https://urldefense.com/v3/__https://autobuilder.yoctoproject.org/typhoon/*/builders/120/builds/1599/steps/12/logs/stdio__;Iw!!CTRNKA9wMg0ARbw!w2oEYTVQJHnJaZ1uIyOM8anxM71iSFQOOkD0yUlbiPPnPzMEZNzYT-4fATdVatAd$

Quoted 3 lines

https://urldefense.com/v3/__https://autobuilder.yoctoproject.org/typhoon/*/builders/100/builds/3296/steps/12/logs/stdio__;Iw!!CTRNKA9wMg0ARbw!w2oEYTVQJHnJaZ1uIyOM8anxM71iSFQOOkD0yUlbiPPnPzMEZNzYT-4fAS5I-4JV$

Quoted 3 lines

https://urldefense.com/v3/__https://autobuilder.yoctoproject.org/typhoon/*builders/128/builds/495/steps/13/logs/stdio__;Iw!!CTRNKA9wMg0ARbw!w2oEYTVQJHnJaZ1uIyOM8anxM71iSFQOOkD0yUlbiPPnPzMEZNzYT-4fAWjB-itS$

Quoted 55 lines
Quoted 49 lines · Yang Xu via lists.openembedded.org

The full path of patch may contain '/meta/' but not in oe-core, skip
patches by checking it starts with oe-core full path or not.

---
 meta/classes-global/insane.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes- renamed from meta/classes-global/insane.bbclass +0 -0

global/insane.bbclass
index 46ea41e271..42daf4388e 100644

meta/classes-global/insane.bbclass +2 -1
@@ -1214,11 +1214,12 @@ python do_qa_patch() {
     import re
     from oe import patch
 
+    coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta/')
     for url in patch.src_patches(d):
        (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
 
        # skip patches not in oe-core
-       if '/meta/' not in fullpath:
+       if not
 os.path.abspath(fullpath).startswith(os.path.abspath(coremeta_path)

):

            continue
 
        kinda_status_re = re.compile(r"^.*upstream.*status.*$",

re.IGNORECASE | re.MULTILINE)

Signature · 16 lines
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169350): 
https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/169350__;!!CTRNKA9wMg0ARbw!w2oEYTVQJHnJaZ1uIyOM8anxM71iSFQOOkD0yUlbiPPnPzMEZNzYT-4fARANYK9G$
 
Mute This Topic: 
https://urldefense.com/v3/__https://lists.openembedded.org/mt/93030817/3617179__;!!CTRNKA9wMg0ARbw!w2oEYTVQJHnJaZ1uIyOM8anxM71iSFQOOkD0yUlbiPPnPzMEZNzYT-4fARYBjDjv$
 
Group Owner: [email protected]
Unsubscribe: 
https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!CTRNKA9wMg0ARbw!w2oEYTVQJHnJaZ1uIyOM8anxM71iSFQOOkD0yUlbiPPnPzMEZNzYT-4fAQIdRTcQ$
$  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-