Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] classes/archiver: Fix WORKDIR for shared source
@ 2019-09-18 21:21 Joshua Watt
  0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2019-09-18 21:21 UTC (permalink / raw)
  To: openembedded-core

When archiving patched source, WORKDIR should only be changed to
${ARCHIVER_WORKDIR} if the recipe doesn't use a shared work directory.
This matches the behavior of do_unpack_and_patch for these recipes.

This fixes kernel recipes that set S = "${WORKDIR}/git"

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/classes/archiver.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 13b05bb5f2f..093e2d95af5 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -221,9 +221,10 @@ python do_ar_patched() {
 
     # Get the ARCHIVER_OUTDIR before we reset the WORKDIR
     ar_outdir = d.getVar('ARCHIVER_OUTDIR')
-    ar_workdir = d.getVar('ARCHIVER_WORKDIR')
+    if not is_work_shared(d):
+        ar_workdir = d.getVar('ARCHIVER_WORKDIR')
+        d.setVar('WORKDIR', ar_workdir)
     bb.note('Archiving the patched source...')
-    d.setVar('WORKDIR', ar_workdir)
     create_tarball(d, d.getVar('S'), 'patched', ar_outdir)
 }
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-18 21:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18 21:21 [PATCH] classes/archiver: Fix WORKDIR for shared source Joshua Watt

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