diff options
Diffstat (limited to 'meta/classes/package_tar.bbclass')
-rw-r--r-- | meta/classes/package_tar.bbclass | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass index 201bd91657..7590177e4b 100644 --- a/meta/classes/package_tar.bbclass +++ b/meta/classes/package_tar.bbclass | |||
@@ -9,9 +9,9 @@ python package_tar_fn () { | |||
9 | } | 9 | } |
10 | 10 | ||
11 | python package_tar_install () { | 11 | python package_tar_install () { |
12 | pkg = d.getVar('PKG', 1) | 12 | pkg = d.getVar('PKG', True) |
13 | pkgfn = d.getVar('PKGFN', 1) | 13 | pkgfn = d.getVar('PKGFN', True) |
14 | rootfs = d.getVar('IMAGE_ROOTFS', 1) | 14 | rootfs = d.getVar('IMAGE_ROOTFS', True) |
15 | 15 | ||
16 | if None in (pkg,pkgfn,rootfs): | 16 | if None in (pkg,pkgfn,rootfs): |
17 | bb.error("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)") | 17 | bb.error("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)") |
@@ -35,24 +35,24 @@ python package_tar_install () { | |||
35 | } | 35 | } |
36 | 36 | ||
37 | python do_package_tar () { | 37 | python do_package_tar () { |
38 | workdir = d.getVar('WORKDIR', 1) | 38 | workdir = d.getVar('WORKDIR', True) |
39 | if not workdir: | 39 | if not workdir: |
40 | bb.error("WORKDIR not defined, unable to package") | 40 | bb.error("WORKDIR not defined, unable to package") |
41 | return | 41 | return |
42 | 42 | ||
43 | outdir = d.getVar('DEPLOY_DIR_TAR', 1) | 43 | outdir = d.getVar('DEPLOY_DIR_TAR', True) |
44 | if not outdir: | 44 | if not outdir: |
45 | bb.error("DEPLOY_DIR_TAR not defined, unable to package") | 45 | bb.error("DEPLOY_DIR_TAR not defined, unable to package") |
46 | return | 46 | return |
47 | bb.mkdirhier(outdir) | 47 | bb.mkdirhier(outdir) |
48 | 48 | ||
49 | dvar = d.getVar('D', 1) | 49 | dvar = d.getVar('D', True) |
50 | if not dvar: | 50 | if not dvar: |
51 | bb.error("D not defined, unable to package") | 51 | bb.error("D not defined, unable to package") |
52 | return | 52 | return |
53 | bb.mkdirhier(dvar) | 53 | bb.mkdirhier(dvar) |
54 | 54 | ||
55 | packages = d.getVar('PACKAGES', 1) | 55 | packages = d.getVar('PACKAGES', True) |
56 | if not packages: | 56 | if not packages: |
57 | bb.debug(1, "PACKAGES not defined, nothing to package") | 57 | bb.debug(1, "PACKAGES not defined, nothing to package") |
58 | return | 58 | return |
@@ -79,11 +79,11 @@ python do_package_tar () { | |||
79 | pkgoutdir = outdir | 79 | pkgoutdir = outdir |
80 | bb.mkdirhier(pkgoutdir) | 80 | bb.mkdirhier(pkgoutdir) |
81 | bb.build.exec_func('package_tar_fn', localdata) | 81 | bb.build.exec_func('package_tar_fn', localdata) |
82 | tarfn = localdata.getVar('PKGFN', 1) | 82 | tarfn = localdata.getVar('PKGFN', True) |
83 | os.chdir(root) | 83 | os.chdir(root) |
84 | from glob import glob | 84 | from glob import glob |
85 | if not glob('*'): | 85 | if not glob('*'): |
86 | bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', 1), localdata.getVar('PKGR', 1))) | 86 | bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True))) |
87 | continue | 87 | continue |
88 | ret = os.system("tar -czf %s %s" % (tarfn, '.')) | 88 | ret = os.system("tar -czf %s %s" % (tarfn, '.')) |
89 | if ret != 0: | 89 | if ret != 0: |