summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-06-13 20:05:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 18:11:04 +0100
commit43dac97f397143abf61fc1c105ea0e4f2fffb90b (patch)
tree243431bb88dd34a0cd7196beb9a924be586184d3 /meta
parentd3059e5d35dcb01641e828c5182615b8fbf1f2e5 (diff)
downloadopenembedded-core-43dac97f397143abf61fc1c105ea0e4f2fffb90b.tar.gz
openembedded-core-43dac97f397143abf61fc1c105ea0e4f2fffb90b.tar.bz2
openembedded-core-43dac97f397143abf61fc1c105ea0e4f2fffb90b.zip
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 <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_ipk.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 08f7020a9e..1b5f4f59e3 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"