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() { return ar_outdir = d.getVar('ARCHIVER_OUTDIR') ar_workdir = d.getVar('ARCHIVER_WORKDIR') + ar_sysroot_native = d.getVar('STAGING_DIR_NATIVE') pn = d.getVar('PN') # The kernel class functions require it to be on work-shared, so we dont change WORKDIR if not (bb.data.inherits_class('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) + # Restore the original path to recipe's native sysroot (it's relative to WORKDIR). + d.setVar('STAGING_DIR_NATIVE', ar_sysroot_native) # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the # possibly requiring of the following tasks (such as some recipes's