summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/archiver.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index e17e6b4a4d..c1076155b7 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -319,6 +319,10 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
319 finally: 319 finally:
320 os.chdir(cwd) 320 os.chdir(cwd)
321 321
322def is_work_shared(d):
323 pn = d.getVar('PN')
324 return bb.data.inherits_class('kernel', d) or pn.startswith('gcc-source')
325
322# Run do_unpack and do_patch 326# Run do_unpack and do_patch
323python do_unpack_and_patch() { 327python do_unpack_and_patch() {
324 if d.getVarFlag('ARCHIVER_MODE', 'src') not in \ 328 if d.getVarFlag('ARCHIVER_MODE', 'src') not in \
@@ -331,7 +335,7 @@ python do_unpack_and_patch() {
331 pn = d.getVar('PN') 335 pn = d.getVar('PN')
332 336
333 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR 337 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
334 if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')): 338 if not is_work_shared(d):
335 # Change the WORKDIR to make do_unpack do_patch run in another dir. 339 # Change the WORKDIR to make do_unpack do_patch run in another dir.
336 d.setVar('WORKDIR', ar_workdir) 340 d.setVar('WORKDIR', ar_workdir)
337 # Restore the original path to recipe's native sysroot (it's relative to WORKDIR). 341 # Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
@@ -351,7 +355,7 @@ python do_unpack_and_patch() {
351 oe.path.copytree(src, src_orig) 355 oe.path.copytree(src, src_orig)
352 356
353 # Make sure gcc and kernel sources are patched only once 357 # Make sure gcc and kernel sources are patched only once
354 if not (d.getVar('SRC_URI') == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))): 358 if not (d.getVar('SRC_URI') == "" or is_work_shared(d)):
355 bb.build.exec_func('do_patch', d) 359 bb.build.exec_func('do_patch', d)
356 360
357 # Create the patches 361 # Create the patches