summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2016-10-10 11:32:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-11 08:31:41 +0100
commit45f7221915d1c87341361f50a3c4beab3290e77c (patch)
treed7497b77161904c9130e30558b3e54f722f796f2
parent0f042b1e1f45682cd418b316216dc507c92c1ace (diff)
downloadpoky-45f7221915d1c87341361f50a3c4beab3290e77c.tar.gz
archiver: fix gcc-source handling
The source archiver was not handling the gcc-source target correctly, since it uses the work-shared directory, we don't want to unpack and patch it twice, just as the comments say, but the code was not there to check for the gcc-source target. [YOCTO #10265] (From OE-Core rev: bbac0699ceadb7a25a60643fb23dffce8b4d23d0) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/archiver.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 1d8e863bdc..9239983e8f 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -303,9 +303,10 @@ python do_unpack_and_patch() {
303 return 303 return
304 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) 304 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
305 ar_workdir = d.getVar('ARCHIVER_WORKDIR', True) 305 ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
306 pn = d.getVar('PN', True)
306 307
307 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR 308 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
308 if not bb.data.inherits_class('kernel-yocto', d): 309 if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')):
309 # Change the WORKDIR to make do_unpack do_patch run in another dir. 310 # Change the WORKDIR to make do_unpack do_patch run in another dir.
310 d.setVar('WORKDIR', ar_workdir) 311 d.setVar('WORKDIR', ar_workdir)
311 312
@@ -323,7 +324,7 @@ python do_unpack_and_patch() {
323 oe.path.copytree(src, src_orig) 324 oe.path.copytree(src, src_orig)
324 325
325 # Make sure gcc and kernel sources are patched only once 326 # Make sure gcc and kernel sources are patched only once
326 if not ((d.getVar('SRC_URI', True) == "" or bb.data.inherits_class('kernel-yocto', d))): 327 if not (d.getVar('SRC_URI', True) == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))):
327 bb.build.exec_func('do_patch', d) 328 bb.build.exec_func('do_patch', d)
328 329
329 # Create the patches 330 # Create the patches