summaryrefslogtreecommitdiffstats
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:44:03 +0100
commit9b32dd5a00f1dde8af88b38dd977e24f3538d108 (patch)
tree10cd11d0199337646ed229307b14ec885437b02b /meta
parent3dfe69bef64c61cc03952f9dbbf3942a1e1f4cee (diff)
downloadpoky-9b32dd5a00f1dde8af88b38dd977e24f3538d108.tar.gz
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. (From OE-Core rev: c294f4ed5a02b055916cfc26a2fca672edee1208) 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 () {
53 import textwrap 53 import textwrap
54 import subprocess 54 import subprocess
55 55
56 oldcwd = os.getcwd()
57
56 workdir = d.getVar('WORKDIR', True) 58 workdir = d.getVar('WORKDIR', True)
57 if not workdir: 59 if not workdir:
58 bb.error("WORKDIR not defined, unable to package") 60 bb.error("WORKDIR not defined, unable to package")
@@ -311,6 +313,7 @@ python do_package_deb () {
311 313
312 cleanupcontrol(root) 314 cleanupcontrol(root)
313 bb.utils.unlockfile(lf) 315 bb.utils.unlockfile(lf)
316 os.chdir(oldcwd)
314} 317}
315# Indirect references to these vars 318# Indirect references to these vars
316do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE" 319do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE"