[oe-commits] [openembedded-core] 04/04: package_ipk: restore cwd after packaging

git at git.openembedded.org git at git.openembedded.org
Wed Jun 15 17:11:31 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 43dac97f397143abf61fc1c105ea0e4f2fffb90b
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Mon Jun 13 20:05:54 2016 +0100

    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 at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/package_ipk.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 08f7020..1b5f4f5 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"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list