summaryrefslogtreecommitdiff
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.bbclass38
1 files changed, 19 insertions, 19 deletions
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index a806e4514..f26a2c000 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -3,15 +3,15 @@ inherit package
IMAGE_PKGTYPE ?= "tar"
python package_tar_fn () {
- fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PKGV', d), bb.data.getVar('PKGR', d)))
+ fn = os.path.join(d.getVar('DEPLOY_DIR_TAR'), "%s-%s-%s.tar.gz" % (d.getVar('PKG'), d.getVar('PKGV'), d.getVar('PKGR')))
fn = bb.data.expand(fn, d)
- bb.data.setVar('PKGFN', fn, d)
+ d.setVar('PKGFN', fn)
}
python package_tar_install () {
- pkg = bb.data.getVar('PKG', d, 1)
- pkgfn = bb.data.getVar('PKGFN', d, 1)
- rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1)
+ pkg = d.getVar('PKG', 1)
+ pkgfn = d.getVar('PKGFN', 1)
+ rootfs = d.getVar('IMAGE_ROOTFS', 1)
if None in (pkg,pkgfn,rootfs):
bb.error("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)")
@@ -35,24 +35,24 @@ python package_tar_install () {
}
python do_package_tar () {
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ workdir = d.getVar('WORKDIR', 1)
if not workdir:
bb.error("WORKDIR not defined, unable to package")
return
- outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1)
+ outdir = d.getVar('DEPLOY_DIR_TAR', 1)
if not outdir:
bb.error("DEPLOY_DIR_TAR not defined, unable to package")
return
bb.mkdirhier(outdir)
- dvar = bb.data.getVar('D', d, 1)
+ dvar = d.getVar('D', 1)
if not dvar:
bb.error("D not defined, unable to package")
return
bb.mkdirhier(dvar)
- packages = bb.data.getVar('PACKAGES', d, 1)
+ packages = d.getVar('PACKAGES', 1)
if not packages:
bb.debug(1, "PACKAGES not defined, nothing to package")
return
@@ -61,11 +61,11 @@ python do_package_tar () {
localdata = bb.data.createCopy(d)
root = "%s/install/%s" % (workdir, pkg)
- bb.data.setVar('ROOT', '', localdata)
- bb.data.setVar('ROOT_%s' % pkg, root, localdata)
- bb.data.setVar('PKG', pkg, localdata)
+ localdata.setVar('ROOT', '')
+ localdata.setVar('ROOT_%s' % pkg, root)
+ localdata.setVar('PKG', pkg)
- overrides = bb.data.getVar('OVERRIDES', localdata)
+ overrides = localdata.getVar('OVERRIDES')
if not overrides:
raise bb.build.FuncFailed('OVERRIDES not defined')
overrides = bb.data.expand(overrides, localdata)
@@ -73,17 +73,17 @@ python do_package_tar () {
bb.data.update_data(localdata)
- root = bb.data.getVar('ROOT', localdata)
+ root = localdata.getVar('ROOT')
bb.mkdirhier(root)
basedir = os.path.dirname(root)
pkgoutdir = outdir
bb.mkdirhier(pkgoutdir)
bb.build.exec_func('package_tar_fn', localdata)
- tarfn = bb.data.getVar('PKGFN', localdata, 1)
+ tarfn = localdata.getVar('PKGFN', 1)
os.chdir(root)
from glob import glob
if not glob('*'):
- bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, 1), bb.data.getVar('PKGR', localdata, 1)))
+ bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', 1), localdata.getVar('PKGR', 1)))
continue
ret = os.system("tar -czf %s %s" % (tarfn, '.'))
if ret != 0:
@@ -91,12 +91,12 @@ python do_package_tar () {
}
python () {
- if bb.data.getVar('PACKAGES', d, True) != '':
- deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split()
+ if d.getVar('PACKAGES', True) != '':
+ deps = (d.getVarFlag('do_package_write_tar', 'depends') or "").split()
deps.append('tar-native:do_populate_sysroot')
deps.append('virtual/fakeroot-native:do_populate_sysroot')
bb.data.setVarFlag('do_package_write_tar', 'depends', " ".join(deps), d)
- bb.data.setVarFlag('do_package_write_ipk', 'fakeroot', "1", d)
+ d.setVarFlag('do_package_write_ipk', 'fakeroot', "1")
}