summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2023-12-11 07:13:17 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-13 11:34:07 +0000
commit5fbb4ca8da4f4f1ea426275c45634802dcb5a575 (patch)
treef6207c25e70fe2a460370a6576a5a8fbf2a5a286
parentff416e9fd6a1a65cf59ecd662613581b6190e05e (diff)
downloadopenembedded-core-5fbb4ca8da4f4f1ea426275c45634802dcb5a575.tar.gz
archiver.bbclass: Improve work-shared checking
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>
-rw-r--r--meta/classes/archiver.bbclass6
1 files changed, 2 insertions, 4 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 0eee1abefa..80a69cf31d 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -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() {