* [PATCH] package_deb: Avoid chdir warnings and restore cwd after packaging
@ 2016-06-16 15:36 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-06-16 15:36 UTC (permalink / raw)
To: openembedded-core
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>
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index e35f427..8f9b09a 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"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-16 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 15:36 [PATCH] package_deb: Avoid chdir warnings and restore cwd after packaging Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox