summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-16 16:36:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-16 22:43:53 +0100
commitc294f4ed5a02b055916cfc26a2fca672edee1208 (patch)
tree81d20760b3531a032f875320e0d324579bbad5d6 /meta
parentfc0d9c27b88a691b0fea98b9a2b2a4f3e978ec87 (diff)
downloadopenembedded-core-c294f4ed5a02b055916cfc26a2fca672edee1208.tar.gz
openembedded-core-c294f4ed5a02b055916cfc26a2fca672edee1208.tar.bz2
openembedded-core-c294f4ed5a02b055916cfc26a2fca672edee1208.zip
package_deb: Avoid chdir warnings and restore cwd after packaging
dpkg-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: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_deb.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index e35f427ea2..8f9b09a780 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -53,6 +53,8 @@ python do_package_deb () {
import textwrap
import subprocess
+ oldcwd = os.getcwd()
+
workdir = d.getVar('WORKDIR', True)
if not workdir:
bb.error("WORKDIR not defined, unable to package")
@@ -311,6 +313,7 @@ python do_package_deb () {
cleanupcontrol(root)
bb.utils.unlockfile(lf)
+ os.chdir(oldcwd)
}
# Indirect references to these vars
do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE"