diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-10-12 02:19:05 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-15 09:53:09 +0100 |
commit | 3753d07c9ff33b9a97aca61ad312b0e283c4c68d (patch) | |
tree | f348d4b303605ab9bfa5835d1880da3b717f657c /meta/classes | |
parent | 98f521fff9bbeb1f7f40a009620884ec664992d7 (diff) | |
download | openembedded-core-3753d07c9ff33b9a97aca61ad312b0e283c4c68d.tar.gz openembedded-core-3753d07c9ff33b9a97aca61ad312b0e283c4c68d.tar.bz2 openembedded-core-3753d07c9ff33b9a97aca61ad312b0e283c4c68d.zip |
package_tar: avoid chdir warnings and restore cwd after packaging
Fixed:
WARNING: attr-2.4.47-r0 do_package_write_tar: Task do_package_tar changed cwd to /path/to/attr/2.4.47-r0/packages-split/attr-locale-sv
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_tar.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass index 854e645286..e217814af4 100644 --- a/meta/classes/package_tar.bbclass +++ b/meta/classes/package_tar.bbclass @@ -4,6 +4,9 @@ IMAGE_PKGTYPE ?= "tar" python do_package_tar () { import subprocess + + oldcwd = os.getcwd() + workdir = d.getVar('WORKDIR', True) if not workdir: bb.error("WORKDIR not defined, unable to package") @@ -49,6 +52,8 @@ python do_package_tar () { ret = subprocess.call(args + [tarfn] + dlist) if ret != 0: bb.error("Creation of tar %s failed." % tarfn) + + os.chdir(oldcwd) } python () { |