summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_tar.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package_tar.bbclass')
-rw-r--r--meta/classes/package_tar.bbclass6
1 files changed, 1 insertions, 5 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 876cec6cfe..24a77be93c 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -3,15 +3,12 @@ inherit package
3IMAGE_PKGTYPE ?= "tar" 3IMAGE_PKGTYPE ?= "tar"
4 4
5python package_tar_fn () { 5python package_tar_fn () {
6 import os
7 from bb import data
8 fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), bb.data.getVar('PR', d))) 6 fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), bb.data.getVar('PR', d)))
9 fn = bb.data.expand(fn, d) 7 fn = bb.data.expand(fn, d)
10 bb.data.setVar('PKGFN', fn, d) 8 bb.data.setVar('PKGFN', fn, d)
11} 9}
12 10
13python package_tar_install () { 11python package_tar_install () {
14 import os, sys
15 pkg = bb.data.getVar('PKG', d, 1) 12 pkg = bb.data.getVar('PKG', d, 1)
16 pkgfn = bb.data.getVar('PKGFN', d, 1) 13 pkgfn = bb.data.getVar('PKGFN', d, 1)
17 rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1) 14 rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1)
@@ -23,6 +20,7 @@ python package_tar_install () {
23 bb.mkdirhier(rootfs) 20 bb.mkdirhier(rootfs)
24 os.chdir(rootfs) 21 os.chdir(rootfs)
25 except OSError: 22 except OSError:
23 import sys
26 (type, value, traceback) = sys.exc_info() 24 (type, value, traceback) = sys.exc_info()
27 print value 25 print value
28 raise bb.build.FuncFailed 26 raise bb.build.FuncFailed
@@ -42,7 +40,6 @@ python do_package_tar () {
42 bb.error("WORKDIR not defined, unable to package") 40 bb.error("WORKDIR not defined, unable to package")
43 return 41 return
44 42
45 import os # path manipulations
46 outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1) 43 outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1)
47 if not outdir: 44 if not outdir:
48 bb.error("DEPLOY_DIR_TAR not defined, unable to package") 45 bb.error("DEPLOY_DIR_TAR not defined, unable to package")
@@ -94,7 +91,6 @@ python do_package_tar () {
94} 91}
95 92
96python () { 93python () {
97 import bb
98 if bb.data.getVar('PACKAGES', d, True) != '': 94 if bb.data.getVar('PACKAGES', d, True) != '':
99 deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split() 95 deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split()
100 deps.append('tar-native:do_populate_staging') 96 deps.append('tar-native:do_populate_staging')