diff options
Diffstat (limited to 'classes/package_tar.bbclass')
-rw-r--r-- | classes/package_tar.bbclass | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index e94e763150..cb4c42b261 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -1,8 +1,5 @@ inherit package -PACKAGE_EXTRA_DEPENDS += "tar-native" - -PACKAGE_WRITE_FUNCS += "do_package_tar" IMAGE_PKGTYPE ?= "tar" python package_tar_fn () { @@ -78,7 +75,7 @@ python do_package_tar () { bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) bb.data.update_data(localdata) -# stuff + root = bb.data.getVar('ROOT', localdata) bb.mkdirhier(root) basedir = os.path.dirname(root) @@ -97,9 +94,18 @@ python do_package_tar () { ret = os.system("tar -czvf %s %s" % (tarfn, '.')) if ret != 0: bb.error("Creation of tar %s failed." % tarfn) +} + +python () { + import bb + if bb.data.getVar('PACKAGES', d, True) != '': + bb.data.setVarFlag('do_package_write_tar', 'depends', 'tar-native:do_populate_staging', d) +} - file(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), 'w').close() -# end stuff - del localdata +python do_package_write_tar () { + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_tar", d) } +do_package_write_tar[dirs] = "${D}" +addtask package_write_tar before do_build after do_package |