]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
package_ipk: restore cwd after packaging
authorRoss Burton <ross.burton@intel.com>
Mon, 13 Jun 2016 19:05:54 +0000 (20:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 Jun 2016 17:11:04 +0000 (18:11 +0100)
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>
meta/classes/package_ipk.bbclass

index 08f7020a9e8a7266a90241cfbfbd123f2aae025f..1b5f4f59e37fcc2568134f7fee34cc26c7d12a72 100644 (file)
@@ -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"