diff mbox series

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

Message ID 20220809012140.26859-1-yang.xu@mediatek.com
State New
Headers show
Series insane.bbclass: Skip patches not in oe-core by full path in do_qa_patch | expand

Commit Message

Yang Xu (徐扬) Aug. 9, 2022, 1:21 a.m. UTC
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.

Signed-off-by: Yang Xu <yang.xu@mediatek.com>
---
 meta/classes/insane.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Yang Xu (徐扬) Aug. 12, 2022, 1:52 a.m. UTC | #1
ping
diff mbox series

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index c8b434bb54..5b2b91f6ff 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1208,11 +1208,12 @@  python do_qa_patch() {
     import re
     from oe import patch
 
+    oecore_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(oecore_path):
            continue
 
        kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE)