summaryrefslogtreecommitdiff
path: root/meta/classes/package_ipk.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-09-01 22:17:06 +0000
committerRichard Purdie <richard@openedhand.com>2007-09-01 22:17:06 +0000
commitc6938aad87ce4b9ce25ecd020ecddfe62b319bcf (patch)
treebf38fd54cc10deb22025853094b3e33c4043d1b2 /meta/classes/package_ipk.bbclass
parenta7c63ec4828e08e0812f69a5be04422e5dd7b30a (diff)
downloadopenembedded-core-c6938aad87ce4b9ce25ecd020ecddfe62b319bcf.tar.gz
openembedded-core-c6938aad87ce4b9ce25ecd020ecddfe62b319bcf.tar.bz2
openembedded-core-c6938aad87ce4b9ce25ecd020ecddfe62b319bcf.zip
Factor ipkg index and conf file creation into package_ipk.bbclass
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2637 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r--meta/classes/package_ipk.bbclass44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index d88d11b994..1175d1e751 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -4,6 +4,9 @@ BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
IMAGE_PKGTYPE ?= "ipk"
+IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf"
+IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf"
+
python package_ipk_fn () {
from bb import data
bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d)
@@ -60,6 +63,47 @@ python package_ipk_install () {
raise bb.build.FuncFailed
}
+#
+# Update the Packages index files in ${DEPLOY_DIR_IPK}
+#
+package_update_index_ipk () {
+ set -x
+
+ ipkgarchs="${PACKAGE_ARCHS}"
+
+ if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
+ return
+ fi
+
+ touch ${DEPLOY_DIR_IPK}/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
+
+ for arch in $ipkgarchs; do
+ if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then
+ touch ${DEPLOY_DIR_IPK}/$arch/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/
+ fi
+ done
+}
+
+#
+# Generate an ipkg conf file ${IPKGCONF_TARGET} suitable for use against
+# the target system and an ipkg conf file ${IPKGCONF_SDK} suitable for
+# use against the host system in sdk builds
+#
+package_generate_ipkg_conf () {
+ mkdir -p ${STAGING_ETCDIR_NATIVE}/
+ echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_TARGET}
+ echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_SDK}
+ ipkgarchs="${PACKAGE_ARCHS}"
+ priority=1
+ for arch in $ipkgarchs; do
+ echo "arch $arch $priority" >> ${IPKGCONF_TARGET}
+ echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${IPKGCONF_SDK}
+ priority=$(expr $priority + 5)
+ done
+}
+
python do_package_ipk () {
import sys, re, fcntl, copy