diff options
-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" | |||
4 | 4 | ||
5 | python do_package_tar () { | 5 | python do_package_tar () { |
6 | import subprocess | 6 | import subprocess |
7 | |||
8 | oldcwd = os.getcwd() | ||
9 | |||
7 | workdir = d.getVar('WORKDIR', True) | 10 | workdir = d.getVar('WORKDIR', True) |
8 | if not workdir: | 11 | if not workdir: |
9 | bb.error("WORKDIR not defined, unable to package") | 12 | bb.error("WORKDIR not defined, unable to package") |
@@ -49,6 +52,8 @@ python do_package_tar () { | |||
49 | ret = subprocess.call(args + [tarfn] + dlist) | 52 | ret = subprocess.call(args + [tarfn] + dlist) |
50 | if ret != 0: | 53 | if ret != 0: |
51 | bb.error("Creation of tar %s failed." % tarfn) | 54 | bb.error("Creation of tar %s failed." % tarfn) |
55 | |||
56 | os.chdir(oldcwd) | ||
52 | } | 57 | } |
53 | 58 | ||
54 | python () { | 59 | python () { |