summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Ylinen <mikko.ylinen@linux.intel.com>2017-06-05 17:42:51 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-07 17:07:57 +0000
commit8c38e42bfd6794ce8a8e750f0835f2ce541d7efd (patch)
tree5637d47bdf5ab1aaa61d681080d31921018678c7
parent7d02e4eaa09d5e327f23c13b4ac301a41408c5f3 (diff)
downloadpoky-8c38e42bfd6794ce8a8e750f0835f2ce541d7efd.tar.gz
archiver.bbclass: adapt do_unpack_and_patch to RSS
do_unpack_and_patch was not correctly run until recently ("archiver.bbclass: various fixes for original+diff mode") but with the fix applied, the errors we get indicate the function is not adapted to work with recipe specific sysroots. do_unpack_and_patch sets WORKDIR to ARCHIVER_WORKDIR which affects all path settings relative to WORKDIR, inluding the paths to recipes' sysroots. IOW, when do_unpack and do_patch are run, they cannot find the necessary native tools and files located in the sysroot (e.g., quiltrc) because the paths point to ARCHIVER_WORKDIR. Adapt do_unpack_and_patch to RSS by restoring the original STAGING_DIR_NATIVE after WORKDIR is changed to ARCHIVER_WORKDIR. (From OE-Core rev: db7d2cc5a4df3c2077ba874c7ae395c73fd9ed13) (From OE-Core rev: 7c0e3c5fa39e7ed3eedee8bac206476f70d1f422) (From OE-Core rev: adb5234ac9c96f29336397552176ab5086772069) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/archiver.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 78c6245553..2dce505138 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -315,12 +315,15 @@ python do_unpack_and_patch() {
315 return 315 return
316 ar_outdir = d.getVar('ARCHIVER_OUTDIR') 316 ar_outdir = d.getVar('ARCHIVER_OUTDIR')
317 ar_workdir = d.getVar('ARCHIVER_WORKDIR') 317 ar_workdir = d.getVar('ARCHIVER_WORKDIR')
318 ar_sysroot_native = d.getVar('STAGING_DIR_NATIVE')
318 pn = d.getVar('PN') 319 pn = d.getVar('PN')
319 320
320 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR 321 # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
321 if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')): 322 if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')):
322 # Change the WORKDIR to make do_unpack do_patch run in another dir. 323 # Change the WORKDIR to make do_unpack do_patch run in another dir.
323 d.setVar('WORKDIR', ar_workdir) 324 d.setVar('WORKDIR', ar_workdir)
325 # Restore the original path to recipe's native sysroot (it's relative to WORKDIR).
326 d.setVar('STAGING_DIR_NATIVE', ar_sysroot_native)
324 327
325 # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the 328 # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the
326 # possibly requiring of the following tasks (such as some recipes's 329 # possibly requiring of the following tasks (such as some recipes's