mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user