[gnome-continuous-yocto/gnomeostree-3.28-rocko: 976/8267] classes/package: save/restore cwd in split_and_strip_files
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 976/8267] classes/package: save/restore cwd in split_and_strip_files
- Date: Sat, 16 Dec 2017 21:10:50 +0000 (UTC)
commit 70d63061f38795e05a1a78d40ed56d73236d4344
Author: Ross Burton <ross burton intel com>
Date: Mon Jun 13 22:09:54 2016 +0100
classes/package: save/restore cwd in split_and_strip_files
This function uses chdir() heavily, so save and restore the cwd so that it
doesn't affect the system state.
(From OE-Core rev: d3059e5d35dcb01641e828c5182615b8fbf1f2e5)
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/package.bbclass | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index c9e2aa8..d6204cf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -841,6 +841,9 @@ python split_and_strip_files () {
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
+ oldcwd = os.getcwd()
+ os.chdir(dvar)
+
# We default to '.debug' style
if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory':
# Single debug-file-directory style debug info
@@ -864,8 +867,6 @@ python split_and_strip_files () {
sourcefile = d.expand("${WORKDIR}/debugsources.list")
bb.utils.remove(sourcefile)
- os.chdir(dvar)
-
# Return type (bits):
# 0 - not elf
# 1 - ELF
@@ -1052,6 +1053,7 @@ python split_and_strip_files () {
#
# End of strip
#
+ os.chdir(oldcwd)
}
python populate_packages () {
@@ -2129,4 +2131,3 @@ def mapping_rename_hook(d):
runtime_mapping_rename("RDEPENDS", pkg, d)
runtime_mapping_rename("RRECOMMENDS", pkg, d)
runtime_mapping_rename("RSUGGESTS", pkg, d)
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]