summaryrefslogtreecommitdiffstats
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)
downloadpoky-c6938aad87ce4b9ce25ecd020ecddfe62b319bcf.tar.gz
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"
4DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link" 4DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
5IMAGE_PKGTYPE ?= "ipk" 5IMAGE_PKGTYPE ?= "ipk"
6 6
7IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf"
8IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf"
9
7python package_ipk_fn () { 10python package_ipk_fn () {
8 from bb import data 11 from bb import data
9 bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) 12 bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d)
@@ -60,6 +63,47 @@ python package_ipk_install () {
60 raise bb.build.FuncFailed 63 raise bb.build.FuncFailed
61} 64}
62 65
66#
67# Update the Packages index files in ${DEPLOY_DIR_IPK}
68#
69package_update_index_ipk () {
70 set -x
71
72 ipkgarchs="${PACKAGE_ARCHS}"
73
74 if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
75 return
76 fi
77
78 touch ${DEPLOY_DIR_IPK}/Packages
79 ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
80
81 for arch in $ipkgarchs; do
82 if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then
83 touch ${DEPLOY_DIR_IPK}/$arch/Packages
84 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/
85 fi
86 done
87}
88
89#
90# Generate an ipkg conf file ${IPKGCONF_TARGET} suitable for use against
91# the target system and an ipkg conf file ${IPKGCONF_SDK} suitable for
92# use against the host system in sdk builds
93#
94package_generate_ipkg_conf () {
95 mkdir -p ${STAGING_ETCDIR_NATIVE}/
96 echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_TARGET}
97 echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_SDK}
98 ipkgarchs="${PACKAGE_ARCHS}"
99 priority=1
100 for arch in $ipkgarchs; do
101 echo "arch $arch $priority" >> ${IPKGCONF_TARGET}
102 echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${IPKGCONF_SDK}
103 priority=$(expr $priority + 5)
104 done
105}
106
63python do_package_ipk () { 107python do_package_ipk () {
64 import sys, re, fcntl, copy 108 import sys, re, fcntl, copy
65 109