diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-17 09:03:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-17 22:32:04 +0000 |
commit | 8fb417a67c0cfd9d9373f53d578e1b659d5a3aa5 (patch) | |
tree | f26b8dea7b478a6504d92187d77669a1e38f37b3 /meta/classes | |
parent | 7e629a36c9c401c7ccd9a550301f8f2c927d6b6a (diff) | |
download | poky-8fb417a67c0cfd9d9373f53d578e1b659d5a3aa5.tar.gz |
package_tar: Remove completely pointless code
Remove/simply overcomplicated code. No functionality change.
(From OE-Core rev: e3b21455e4ecc5b4961cf52e035a2d6d541faf69)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_tar.bbclass | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass index 27cddaacd1..56bca89a5a 100644 --- a/meta/classes/package_tar.bbclass +++ b/meta/classes/package_tar.bbclass | |||
@@ -2,12 +2,6 @@ inherit package | |||
2 | 2 | ||
3 | IMAGE_PKGTYPE ?= "tar" | 3 | IMAGE_PKGTYPE ?= "tar" |
4 | 4 | ||
5 | python package_tar_fn () { | ||
6 | fn = os.path.join(d.getVar('DEPLOY_DIR_TAR'), "%s-%s-%s.tar.gz" % (d.getVar('PKG'), d.getVar('PKGV'), d.getVar('PKGR'))) | ||
7 | fn = d.expand(fn) | ||
8 | d.setVar('PKGFN', fn) | ||
9 | } | ||
10 | |||
11 | python do_package_tar () { | 5 | python do_package_tar () { |
12 | import subprocess | 6 | import subprocess |
13 | workdir = d.getVar('WORKDIR', True) | 7 | workdir = d.getVar('WORKDIR', True) |
@@ -19,42 +13,31 @@ python do_package_tar () { | |||
19 | if not outdir: | 13 | if not outdir: |
20 | bb.error("DEPLOY_DIR_TAR not defined, unable to package") | 14 | bb.error("DEPLOY_DIR_TAR not defined, unable to package") |
21 | return | 15 | return |
22 | bb.utils.mkdirhier(outdir) | ||
23 | 16 | ||
24 | dvar = d.getVar('D', True) | 17 | dvar = d.getVar('D', True) |
25 | if not dvar: | 18 | if not dvar: |
26 | bb.error("D not defined, unable to package") | 19 | bb.error("D not defined, unable to package") |
27 | return | 20 | return |
28 | bb.utils.mkdirhier(dvar) | ||
29 | 21 | ||
30 | packages = d.getVar('PACKAGES', True) | 22 | packages = d.getVar('PACKAGES', True) |
31 | if not packages: | 23 | if not packages: |
32 | bb.debug(1, "PACKAGES not defined, nothing to package") | 24 | bb.debug(1, "PACKAGES not defined, nothing to package") |
33 | return | 25 | return |
34 | 26 | ||
27 | bb.utils.mkdirhier(outdir) | ||
28 | bb.utils.mkdirhier(dvar) | ||
29 | |||
35 | for pkg in packages.split(): | 30 | for pkg in packages.split(): |
36 | localdata = bb.data.createCopy(d) | 31 | localdata = bb.data.createCopy(d) |
37 | root = "%s/install/%s" % (workdir, pkg) | 32 | root = "%s/install/%s" % (workdir, pkg) |
38 | 33 | ||
39 | localdata.setVar('ROOT', '') | ||
40 | localdata.setVar('ROOT_%s' % pkg, root) | ||
41 | localdata.setVar('PKG', pkg) | ||
42 | |||
43 | overrides = localdata.getVar('OVERRIDES') | 34 | overrides = localdata.getVar('OVERRIDES') |
44 | if not overrides: | ||
45 | raise bb.build.FuncFailed('OVERRIDES not defined') | ||
46 | overrides = localdata.expand(overrides) | ||
47 | localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg)) | 35 | localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg)) |
48 | |||
49 | bb.data.update_data(localdata) | 36 | bb.data.update_data(localdata) |
50 | 37 | ||
51 | root = localdata.getVar('ROOT') | ||
52 | bb.utils.mkdirhier(root) | 38 | bb.utils.mkdirhier(root) |
53 | basedir = os.path.dirname(root) | 39 | basedir = os.path.dirname(root) |
54 | pkgoutdir = outdir | 40 | tarfn = localdata.expand("${DEPLOY_DIR_TAR}/${PKG}-${PKGV}-${PKGR}.tar.gz") |
55 | bb.utils.mkdirhier(pkgoutdir) | ||
56 | bb.build.exec_func('package_tar_fn', localdata) | ||
57 | tarfn = localdata.getVar('PKGFN', True) | ||
58 | os.chdir(root) | 41 | os.chdir(root) |
59 | from glob import glob | 42 | from glob import glob |
60 | if not glob('*'): | 43 | if not glob('*'): |