diff options
author | Koen Kooi <koen@openembedded.org> | 2006-08-07 09:34:08 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2006-08-07 09:34:08 +0000 |
commit | 9989f57d8adae1b09d9c6deb9481ccc7120dbd77 (patch) | |
tree | 16bf703ee6e8da95299c2e6df64d99a72ddeb65f | |
parent | b4003008f439b78baff7d64a8ec9843dcb37dde1 (diff) | |
download | openembedded-9989f57d8adae1b09d9c6deb9481ccc7120dbd77.tar.gz |
classes/package_ipk.bbclass: move PACKAGE_FUNC from here ...
classes/packaged-staging.bbclass: ... to here
The packaged-staging stuff is now completely self-contained in one class now
-rw-r--r-- | classes/package_ipk.bbclass | 36 | ||||
-rw-r--r-- | classes/packaged-staging.bbclass | 37 |
2 files changed, 38 insertions, 35 deletions
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index 1ada844057..9ae526bb3b 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -1,47 +1,13 @@ inherit package DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" -PACKAGEFUNCS += "do_package_ipk do_write_ipk_list" +PACKAGEFUNCS += "do_package_ipk" python package_ipk_fn () { from bb import data bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) } - -python do_write_ipk_list () { - import os, sys - ipkdir = bb.data.getVar('DEPLOY_DIR_IPK', d, 1) - stagingdir = bb.data.getVar('STAGING_DIR', d, 1) - tmpdir = bb.data.getVar('TMPDIR', d, 1) - p = bb.data.getVar('P', d, 1) - pr = bb.data.getVar('PR', d, 1) - - packages = bb.data.getVar('PACKAGES', d, 1) - if not packages: - bb.debug(1, "PACKAGES not defined, nothing to package") - return - - if packages == []: - bb.debug(1, "No packages; nothing to do") - return - - # Generate ipk.conf if it or the stamp doesnt exist - listfile = os.path.join(stagingdir,"pkgmaps","%s-%s.spawn" % ( p , pr )) - os.system('mkdir -p ' + stagingdir + '/pkgmaps') - if not os.access(listfile, os.R_OK): - os.system('rm -f ' + listfile) - f = open(listfile,"w") - for spawn in packages.split(): - #check if the packagename has changed due to debian shlib renaming - localdata = bb.data.createCopy(d) - pkgname = bb.data.getVar('PKG_%s' % spawn, localdata, 1) - if not pkgname: - pkgname = spawn - f.write("%s\n" % pkgname) - f.close() -} - python package_ipk_install () { import os, sys pkg = bb.data.getVar('PKG', d, 1) diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index d12da09ca5..e83a373751 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -11,6 +11,7 @@ # * does not distinguish between -native, -cross and other packages # * is oblivious to CROSSDIR # * breaks when a recipe needs stuff from STAGING_DIR to be present during do_stage, broken behaviour IMO +# * same goes for CROSS_DIR # TODO: # * also make packages for CROSSDIR @@ -36,6 +37,42 @@ SPAWNIPK = ${spawn} STAGING_BASEDIR = "${STAGING_LIBDIR}/.." +PACKAGEFUNCS += "do_write_ipk_list" + +python do_write_ipk_list () { + import os, sys + ipkdir = bb.data.getVar('DEPLOY_DIR_IPK', d, 1) + stagingdir = bb.data.getVar('STAGING_DIR', d, 1) + tmpdir = bb.data.getVar('TMPDIR', d, 1) + p = bb.data.getVar('P', d, 1) + pr = bb.data.getVar('PR', d, 1) + + packages = bb.data.getVar('PACKAGES', d, 1) + if not packages: + bb.debug(1, "PACKAGES not defined, nothing to package") + return + + if packages == []: + bb.debug(1, "No packages; nothing to do") + return + + # Generate ipk.conf if it or the stamp doesnt exist + listfile = os.path.join(stagingdir,"pkgmaps","%s-%s.spawn" % ( p , pr )) + os.system('mkdir -p ' + stagingdir + '/pkgmaps') + if not os.access(listfile, os.R_OK): + os.system('rm -f ' + listfile) + f = open(listfile,"w") + for spawn in packages.split(): + #check if the packagename has changed due to debian shlib renaming + localdata = bb.data.createCopy(d) + pkgname = bb.data.getVar('PKG_%s' % spawn, localdata, 1) + if not pkgname: + pkgname = spawn + f.write("%s\n" % pkgname) + f.close() +} + + do_clean_append() { """clear the build and temp directories""" stagepkg = bb.data.expand("${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME}", d) |