Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-core] [PATCH] archiver.bbclass: Fix archiver interaction with kernel recipes
@ 2024-10-10  5:25 Phil Reid
  2024-10-10  7:17 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Reid @ 2024-10-10  5:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Phil Reid

Changes to the logic of is_work_shared where made in
commit: 5fbb4ca8da4f4f1ea426275c45634802dcb5a575
"archiver.bbclass: Improve work-shared checking"

The resuled in a change of the logic (simplifed here) from:
  inherits(gcc-source) or inherits(kernel) or (inherits(kernelsrc) and srcin(work-shared))
to just
  srcin(work-shared)

With INHERIT += "archiver" in the local.conf and a kernel recipe that uses
KERNEL_PACKAGE_NAME. When KERNEL_PACKAGE_NAME is defined the kernel
source is not placed into work-shared, but the archiver ends up
deleting the source folder in the work dir, and the build subsequently fails.

Restore the previous logic while also mainting the referenced commits intent
to consider all recipes that use work-shared. Logic is now
  inherits(gcc-source) or inherits(kernel) or srcin(work-shared)

Signed-off-by: Phil Reid <preid@electromag.com.au>
---
 meta/classes/archiver.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 9d286224d6..2112b696ce 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -472,9 +472,12 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
         os.chdir(cwd)
 
 def is_work_shared(d):
+    pn = d.getVar('PN')
     sharedworkdir = os.path.join(d.getVar('TMPDIR'), 'work-shared')
     sourcedir = os.path.realpath(d.getVar('S'))
-    return sourcedir.startswith(sharedworkdir)
+    return sourcedir.startswith(sharedworkdir) or \
+      pn.startswith('gcc-source') or bb.data.inherits_class('kernel', d)
+
 
 # Run do_unpack and do_patch
 python do_unpack_and_patch() {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-01 12:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10  5:25 [OE-core] [PATCH] archiver.bbclass: Fix archiver interaction with kernel recipes Phil Reid
2024-10-10  7:17 ` Richard Purdie
2024-10-10 23:40   ` Phil Reid
2024-10-11 11:57     ` Richard Purdie
2024-11-01 12:02       ` Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox