base.bbclass: fix quoting for md5/sha256 checksums checking
[openembedded.git] / classes / package_tar.bbclass
index cb70a5f..b905e17 100644 (file)
@@ -1,16 +1,11 @@
 inherit package
 
-IMAGE_PKGTYPE ?= "tar"
-
 python package_tar_fn () {
-       import os
-       from bb import data
        fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d, True), bb.data.expand('${PKG}-${PV}-${PR}${DISTRO_PR}.tar.gz', d, True))
        bb.data.setVar('PKGFN', fn, d)
 }
 
 python package_tar_install () {
-       import os, sys
        pkg = bb.data.getVar('PKG', d, 1)
        pkgfn = bb.data.getVar('PKGFN', d, 1)
        rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1)
@@ -22,6 +17,7 @@ python package_tar_install () {
                bb.mkdirhier(rootfs)
                os.chdir(rootfs)
        except OSError:
+               import sys
                (type, value, traceback) = sys.exc_info()
                print value
                raise bb.build.FuncFailed
@@ -41,7 +37,6 @@ python do_package_tar () {
                bb.error("WORKDIR not defined, unable to package")
                return
 
-       import os # path manipulations
        outdir = bb.data.getVar('DEPLOY_DIR_TAR', d, 1)
        if not outdir:
                bb.error("DEPLOY_DIR_TAR not defined, unable to package")
@@ -61,7 +56,8 @@ python do_package_tar () {
 
        for pkg in packages.split():
                localdata = bb.data.createCopy(d)
-               root = "%s/install/%s" % (workdir, pkg)
+               pkgdest = bb.data.getVar('PKGDEST', d, 1)
+               root = "%s/%s" % (pkgdest, pkg)
 
                bb.data.setVar('ROOT', '', localdata)
                bb.data.setVar('ROOT_%s' % pkg, root, localdata)
@@ -93,7 +89,6 @@ python do_package_tar () {
 }
 
 python () {
-    import bb
     if bb.data.getVar('PACKAGES', d, True) != '':
         deps = (bb.data.getVarFlag('do_package_write_tar', 'depends', d) or "").split()
         deps.append('tar-native:do_populate_staging')