summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-03-18 21:58:41 +0000
committerKoen Kooi <koen@openembedded.org>2008-03-18 21:58:41 +0000
commit2d6a5aa1ace8f7a7a4de76fa8ae23e048ddda2b9 (patch)
treebf9a69086fc9c94791c7e681cf5e90ae10e2d5dd /classes
parentedeb6195704d0d22b5f7fefd0d72f3a7dc4ea0e7 (diff)
various: move over to opkg, as discussed on the mailinglist
* death to ipkg!
Diffstat (limited to 'classes')
-rw-r--r--classes/image.bbclass6
-rw-r--r--classes/package_ipk.bbclass14
-rw-r--r--classes/packaged-staging.bbclass18
-rw-r--r--classes/rootfs_deb.bbclass18
-rw-r--r--classes/rootfs_ipk.bbclass28
-rw-r--r--classes/testlab.bbclass12
6 files changed, 49 insertions, 47 deletions
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 67a3a4fa10..f8d896d813 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -85,8 +85,6 @@ fakeroot do_rootfs () {
insert_feed_uris
- rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/*
-
${IMAGE_PREPROCESS_COMMAND}
export TOPDIR=${TOPDIR}
@@ -132,7 +130,7 @@ insert_feed_uris () {
echo "Added $feed_name feed with URL $feed_uri"
# insert new feed-sources
- echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf
+ echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf
done
# Allow to use package deploy directory contents as quick devel-testing
@@ -142,7 +140,7 @@ insert_feed_uris () {
if [ -n "${FEED_DEPLOYDIR_BASE_URI}" ]; then
for arch in ${PACKAGE_ARCHS}
do
- echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/ipkg/local-$arch-feed.conf
+ echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/opkg/local-$arch-feed.conf
done
fi
}
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index e47bc6a880..f05b7449cf 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -1,17 +1,17 @@
inherit package
-BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg"
+BOOTSTRAP_EXTRA_RDEPENDS += "opkg-collateral opkg"
IMAGE_PKGTYPE ?= "ipk"
-IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf"
-IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf"
+IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/opkg.conf"
+IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/opkg-sdk.conf"
python package_ipk_fn () {
from bb import data
bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d)
}
-python package_ipk_install () {
+python package_ipk_install () {
#
# Warning - this function is not multimachine safe (see stagingdir reference)!
#
@@ -35,7 +35,7 @@ python package_ipk_install () {
raise bb.build.FuncFailed
# Generate ipk.conf if it or the stamp doesnt exist
- conffile = os.path.join(stagingdir,"ipkg.conf")
+ conffile = os.path.join(stagingdir,"opkg.conf")
if not os.access(conffile, os.R_OK):
ipkg_archs = bb.data.getVar('PACKAGE_ARCHS',d)
if ipkg_archs is None:
@@ -60,8 +60,8 @@ python package_ipk_install () {
f = open(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),"w")
f.close()
- ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile))
- ret = os.system('ipkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn))
+ ret = os.system('opkg-cl -o %s -f %s update' % (rootfs, conffile))
+ ret = os.system('opkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn))
if (ret != 0 ):
raise bb.build.FuncFailed
}
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index bd7255d610..1c717b415e 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -26,6 +26,8 @@ PSTAGE_NATIVEDEPENDS = "\
pkgconfig-native \
autoconf-native \
automake-native \
+ curl-native \
+ zlib-native \
libtool-native \
gnu-config-native \
shasum-native \
@@ -33,7 +35,7 @@ PSTAGE_NATIVEDEPENDS = "\
automake-native \
update-alternatives-cworth-native \
ipkg-utils-native \
- ipkg-native \
+ opkg-native \
m4-native \
quilt-native \
stagemanager-native \
@@ -70,7 +72,7 @@ python () {
bb.data.setVarFlag('do_populate_staging', 'depends', deps, d)
deps = bb.data.getVarFlag('do_prepackaged_stage', 'depends', d) or ""
- deps += " ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
+ deps += " opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
bb.data.setVarFlag('do_prepackaged_stage', 'depends', deps, d)
bb.data.setVar("PSTAGING_ACTIVE", "1", d)
else:
@@ -78,13 +80,13 @@ python () {
}
DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage"
-PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/ipkg.conf"
+PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/opkg.conf"
PSTAGE_BUILD_CMD = "${IPKGBUILDCMD}"
-PSTAGE_INSTALL_CMD = "ipkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
-PSTAGE_UPDATE_CMD = "ipkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
-PSTAGE_REMOVE_CMD = "ipkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
-PSTAGE_LIST_CMD = "ipkg-cl list_installed -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_INSTALL_CMD = "opkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_UPDATE_CMD = "opkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_REMOVE_CMD = "opkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_LIST_CMD = "opkg-cl list_installed -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
PSTAGE_TMPDIR_STAGE = "${WORKDIR}/staging-pkg"
@@ -106,7 +108,7 @@ do_clean_append() {
}
staging_helper () {
- # Assemble appropriate ipkg.conf
+ # Assemble appropriate opkg.conf
conffile=${PSTAGE_MACHCONFIG}
mkdir -p ${DEPLOY_DIR_PSTAGE}/pstaging_lists
if [ ! -e $conffile ]; then
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 5237285e4c..c59c75e1e5 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -109,22 +109,22 @@ fakeroot rootfs_deb_do_rootfs () {
set -e
- # Hacks to make dpkg/ipkg coexist for now
+ # Hacks to make dpkg/opkg coexist for now
mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/
if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then
rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
fi
- if [ ! -e ${IMAGE_ROOTFS}${libdir}/ipkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}${libdir}/ipkg
+ if [ ! -e ${IMAGE_ROOTFS}${libdir}/opkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg
fi
- if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/ipkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg
+ if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/opkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg
fi
- ln -sf ${libdir}/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
- ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/ipkg/info
- ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/ipkg/status
+ ln -sf ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
+ ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/opkg/info
+ ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/opkg/status
${ROOTFS_POSTPROCESS_COMMAND}
@@ -152,6 +152,6 @@ rootfs_deb_log_check() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/
+ rm -rf ${IMAGE_ROOTFS}${libdir}/opkg/
rm -rf ${IMAGE_ROOTFS}/usr/dpkg/
}
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 28ba03d675..4954fb2c44 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -5,12 +5,12 @@
# See image.bbclass for a usage of this.
#
-do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
+do_rootfs[depends] += "opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
do_rootfs[recrdeptask] += "do_package_write_ipk"
IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
-DISTRO_EXTRA_RDEPENDS += " ipkg ipkg-collateral "
+DISTRO_EXTRA_RDEPENDS += " opkg opkg-collateral "
PACKAGE_INSTALL_NO_DEPS ?= "0"
fakeroot rootfs_ipk_do_rootfs () {
@@ -21,41 +21,43 @@ fakeroot rootfs_ipk_do_rootfs () {
mkdir -p ${T}
- ipkg-cl ${IPKG_ARGS} update
+ opkg-cl ${IPKG_ARGS} update
# Uclibc builds don't provide this stuff...
if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
if [ ! -z "${LINGUAS_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
+ opkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
for i in ${LINGUAS_INSTALL}; do
- ipkg-cl ${IPKG_ARGS} install $i
+ opkg-cl ${IPKG_ARGS} install $i
done
fi
fi
if [ ! -z "${PACKAGE_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
+ opkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
fi
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
- mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg/
- grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}${sysconfdir}/ipkg/arch.conf
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg/
+ grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}${sysconfdir}/opkg/arch.conf
- for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.preinst; do
+ for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
- ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
+ opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
fi
done
- for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.postinst; do
+ for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do
if [ -f $i ] && ! sh $i configure; then
- ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
+ opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
fi
done
install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
+ rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/*
+
${ROOTFS_POSTPROCESS_COMMAND}
log_check rootfs
@@ -82,5 +84,5 @@ rootfs_ipk_log_check() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/
+ rm -rf ${IMAGE_ROOTFS}${libdir}/opkg/
}
diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass
index 5a88f3de62..563a5bff28 100644
--- a/classes/testlab.bbclass
+++ b/classes/testlab.bbclass
@@ -19,10 +19,10 @@
# * add test suite to run on the target device
-# Needs 'dot', 'ipkg-cl'
+# Needs 'dot', 'opkg-cl'
do_testlab() {
-if [ -e ${IMAGE_ROOTFS}/etc/ipkg ] ; then
+if [ -e ${IMAGE_ROOTFS}/etc/opkg ] ; then
TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab"
mkdir -p ${TESTLAB_DIR}/
@@ -31,14 +31,14 @@ if [ -e ${IMAGE_ROOTFS}/etc/ipkg ] ; then
echo > ${TESTLAB_DIR}/installed-packages.txt
echo -e "digraph depends {\n node [shape=plaintext]" > ${TESTLAB_DIR}/depends.dot
- for pkg in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} list_installed | awk '{print $1}') ; do
- ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info $pkg | grep Filename | awk -F: '{print $2}' >> ${TESTLAB_DIR}/installed-packages.txt
+ for pkg in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} list_installed | awk '{print $1}') ; do
+ opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Filename | awk -F: '{print $2}' >> ${TESTLAB_DIR}/installed-packages.txt
- for depends in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
+ for depends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v Depends | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
done
- for recommends in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
+ for recommends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v Recom | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
done
done