diff options
authorSaul Wold <>2016-10-10 11:32:05 -0700
committerRichard Purdie <>2016-11-08 23:03:16 +0000
commit7c83d20fe48064df2200f4aa9e7c7d772b69f574 (patch)
parent88be4b40bacc7c8a08fb76fc220f491deb2c1c3a (diff)
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 <> Signed-off-by: Richard Purdie <> Signed-off-by: Armin Kuster <>
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 2f3b278fb3..7b90025fb5 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -270,9 +270,10 @@ python do_unpack_and_patch() {
ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
+ pn = d.getVar('PN', True)
# The kernel class functions require it to be on work-shared, so we dont change WORKDIR
- if not'kernel-yocto', d):
+ if not ('kernel-yocto', d) or pn.startswith('gcc-source')):
# Change the WORKDIR to make do_unpack do_patch run in another dir.
d.setVar('WORKDIR', ar_workdir)
@@ -290,7 +291,7 @@ python do_unpack_and_patch() {
oe.path.copytree(src, src_orig)
# Make sure gcc and kernel sources are patched only once
- if not ((d.getVar('SRC_URI', True) == "" or'kernel-yocto', d))):
+ if not (d.getVar('SRC_URI', True) == "" or ('kernel-yocto', d) or pn.startswith('gcc-source'))):'do_patch', d)
# Create the patches