diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-09-01 15:16:50 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-09-01 15:16:50 +0000 |
commit | eb4534607c691fa07f62c054dea9cc18baf3d9a2 (patch) | |
tree | eb78efd4f7adffa20ddb29cb01d3f442b116b78c /classes | |
parent | 1a5d699fdc0dd5652186bfe154c3ebd05deb8811 (diff) |
classes: Convert to PKGDATA_DIR variable (from poky)
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 10 | ||||
-rw-r--r-- | classes/package.bbclass | 8 | ||||
-rw-r--r-- | classes/package_ipk.bbclass | 3 | ||||
-rw-r--r-- | classes/package_tar.bbclass | 7 |
4 files changed, 10 insertions, 18 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 32f7fcbe31..23ca444fe6 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -724,7 +724,7 @@ def explode_deps(s): def packaged(pkg, d): import os, bb - return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK) + return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK) def read_pkgdatafile(fn): pkgdata = {} @@ -750,23 +750,23 @@ def read_pkgdatafile(fn): def has_subpkgdata(pkg, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d) + fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) return os.access(fn, os.R_OK) def read_subpkgdata(pkg, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d) + fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) return read_pkgdatafile(fn) def has_pkgdata(pn, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d) + fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return os.access(fn, os.R_OK) def read_pkgdata(pn, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d) + fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return read_pkgdatafile(fn) python read_subpackage_metadata () { diff --git a/classes/package.bbclass b/classes/package.bbclass index bc69dc9f8f..fe48ec6afd 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -503,13 +503,13 @@ python emit_pkgdata() { if not packages: return - data_file = bb.data.expand("${STAGING_DIR}/pkgdata/${PN}", d) + data_file = bb.data.expand("${PKGDATA_DIR}/${PN}", d) f = open(data_file, 'w') f.write("PACKAGES: %s\n" % packages) f.close() for pkg in packages.split(): - subdata_file = bb.data.expand("${STAGING_DIR}/pkgdata/runtime/%s" % pkg, d) + subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d) sf = open(subdata_file, 'w') write_if_exists(sf, pkg, 'DESCRIPTION') write_if_exists(sf, pkg, 'RDEPENDS') @@ -528,7 +528,7 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'pkg_prerm') sf.close() } -emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime" +emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime" ldconfig_postinst_fragment() { if [ x"$D" = "x" ]; then @@ -830,7 +830,7 @@ python package_depchains() { def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): def packaged(pkg, d): - return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK) + return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK) #bb.note('rdepends for %s is %s' % (base, rdepends)) diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index 9200055495..b7d378b20c 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -231,8 +231,6 @@ python do_package_ipk () { if ret != 0: raise bb.build.FuncFailed("ipkg-build execution failed") - file(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), 'w').close() - for script in ["preinst", "postinst", "prerm", "postrm", "control" ]: scriptfile = os.path.join(controldir, script) try: @@ -243,5 +241,4 @@ python do_package_ipk () { os.rmdir(controldir) except OSError: pass - del localdata } diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index e94e763150..ced7400ac8 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -78,7 +78,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 +97,4 @@ python do_package_tar () { ret = os.system("tar -czvf %s %s" % (tarfn, '.')) if ret != 0: bb.error("Creation of tar %s failed." % tarfn) - - file(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), 'w').close() - -# end stuff - del localdata } |