]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
archiver.bbclass: Improve work-shared checking
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 11 Dec 2023 15:13:17 +0000 (07:13 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Dec 2023 11:34:07 +0000 (11:34 +0000)
There are other recipes except the listed ones which use work-shared, improve
the checking to make other recipes such as llvm-project-source work with
do_ar_patched.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes/archiver.bbclass

index 0eee1abefab9ec45b5c2c7af04f598f354c127e2..80a69cf31db49040ff18beeb3fe05f6257c5e80c 100644 (file)
@@ -468,10 +468,8 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
         os.chdir(cwd)
 
 def is_work_shared(d):
-    pn = d.getVar('PN')
-    return pn.startswith('gcc-source') or \
-        bb.data.inherits_class('kernel', d) or \
-        (bb.data.inherits_class('kernelsrc', d) and d.expand("${TMPDIR}/work-shared") in d.getVar('S'))
+    sharedworkdir = os.path.join(d.getVar('TMPDIR'), 'work-shared')
+    return d.getVar('S').startswith(sharedworkdir)
 
 # Run do_unpack and do_patch
 python do_unpack_and_patch() {