From: Ross Burton Date: Mon, 13 Jun 2016 19:05:54 +0000 (+0100) Subject: package_ipk: restore cwd after packaging X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~25308 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43dac97f397143abf61fc1c105ea0e4f2fffb90b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git package_ipk: restore cwd after packaging opkg-build needs to be executed in the root of the package, so save and restore the current directory so this task doesn't modify the state. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 08f7020a9e8..1b5f4f59e37 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -21,6 +21,8 @@ python do_package_ipk () { import textwrap import subprocess + oldcwd = os.getcwd() + workdir = d.getVar('WORKDIR', True) outdir = d.getVar('PKGWRITEDIRIPK', True) tmpdir = d.getVar('TMPDIR', True) @@ -254,6 +256,7 @@ python do_package_ipk () { cleanupcontrol(root) bb.utils.unlockfile(lf) + os.chdir(oldcwd) } # Otherwise allarch packages may change depending on override configuration do_package_ipk[vardepsexclude] = "OVERRIDES"