]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/archiver: Fix WORKDIR for shared source
authorJoshua Watt <jpewhacker@gmail.com>
Wed, 18 Sep 2019 21:21:32 +0000 (16:21 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Sep 2019 09:54:26 +0000 (10:54 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/archiver.bbclass

index 13b05bb5f2f71abb5ea07f90f1caffdf5a58162c..093e2d95af55b957e581c9bdaa0227d85f25e369 100644 (file)
@@ -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)
 }