summaryrefslogtreecommitdiff
path: root/meta/classes/package_tar.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-03 10:59:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-05 10:33:18 -0800
commit41bc192c0b5795561b239872008c91a867732219 (patch)
treea21feb51bde721ba553296676ce4b5ea2662bf37 /meta/classes/package_tar.bbclass
parent3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff)
downloadopenembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.gz
openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.bz2
openembedded-core-41bc192c0b5795561b239872008c91a867732219.zip
meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_tar.bbclass')
-rw-r--r--meta/classes/package_tar.bbclass18
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 () {
}
python package_tar_install () {
- pkg = d.getVar('PKG', 1)
- pkgfn = d.getVar('PKGFN', 1)
- rootfs = d.getVar('IMAGE_ROOTFS', 1)
+ pkg = d.getVar('PKG', True)
+ pkgfn = d.getVar('PKGFN', True)
+ rootfs = d.getVar('IMAGE_ROOTFS', True)
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 = d.getVar('WORKDIR', 1)
+ workdir = d.getVar('WORKDIR', True)
if not workdir:
bb.error("WORKDIR not defined, unable to package")
return
- outdir = d.getVar('DEPLOY_DIR_TAR', 1)
+ outdir = d.getVar('DEPLOY_DIR_TAR', True)
if not outdir:
bb.error("DEPLOY_DIR_TAR not defined, unable to package")
return
bb.mkdirhier(outdir)
- dvar = d.getVar('D', 1)
+ dvar = d.getVar('D', True)
if not dvar:
bb.error("D not defined, unable to package")
return
bb.mkdirhier(dvar)
- packages = d.getVar('PACKAGES', 1)
+ packages = d.getVar('PACKAGES', True)
if not packages:
bb.debug(1, "PACKAGES not defined, nothing to package")
return
@@ -79,11 +79,11 @@ python do_package_tar () {
pkgoutdir = outdir
bb.mkdirhier(pkgoutdir)
bb.build.exec_func('package_tar_fn', localdata)
- tarfn = localdata.getVar('PKGFN', 1)
+ tarfn = localdata.getVar('PKGFN', True)
os.chdir(root)
from glob import glob
if not glob('*'):
- bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', 1), localdata.getVar('PKGR', 1)))
+ bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
continue
ret = os.system("tar -czf %s %s" % (tarfn, '.'))
if ret != 0: