summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorChris Elston <celston@katalix.com>2011-07-11 13:14:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-12 15:01:24 +0100
commit2b6900ad73919a0ecb8c5f1de31744ce7afe65f5 (patch)
tree9538d4fd2e998dae35896fd6e2d5b7f0c9c61561 /meta/classes
parentf707953372dd0962efb5cb8daeb422743376bc29 (diff)
downloadopenembedded-core-2b6900ad73919a0ecb8c5f1de31744ce7afe65f5.tar.gz
openembedded-core-2b6900ad73919a0ecb8c5f1de31744ce7afe65f5.tar.bz2
openembedded-core-2b6900ad73919a0ecb8c5f1de31744ce7afe65f5.zip
Add support for BAD_RECOMMENDATIONS to rootfs_ipk
As discussed on IRC on 30/06/11, this patch adds support for BAD_RECOMMENDATIONS to rootfs_ipk, which is a list of packages NOT to install if suggested or recommended by a recipe. Taken from http://thread.gmane.org/gmane.comp.handhelds.openembedded/30417. Note that current support for this in oe.dev may also be broken, depending on the version of opkg in use. Signed-off-by: Chris Elston <celston@katalix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/rootfs_ipk.bbclass20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 3b4b4da43d..4fcacc67ec 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -20,6 +20,9 @@ OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris"
opkglibdir = "${localstatedir}/lib/opkg"
+# Which packages to not install on the basis of a recommendation
+BAD_RECOMMENDATIONS ?= ""
+
fakeroot rootfs_ipk_do_rootfs () {
set -x
@@ -29,6 +32,23 @@ fakeroot rootfs_ipk_do_rootfs () {
${OPKG_PREPROCESS_COMMANDS}
mkdir -p ${T}/
+
+ STATUS=${IMAGE_ROOTFS}${opkglibdir}/status
+ mkdir -p ${IMAGE_ROOTFS}${opkglibdir}
+
+ opkg-cl ${IPKG_ARGS} update
+
+ # prime the status file with bits that we don't want
+ for i in ${BAD_RECOMMENDATIONS}; do
+ pkginfo="`opkg-cl ${IPKG_ARGS} info $i`"
+ if [ ! -z "$pkginfo" ]; then
+ echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS
+ echo "Status: deinstall ok not-installed" >> $STATUS
+ echo >> $STATUS
+ else
+ echo "Requested ignored recommendation $i is not a package"
+ fi
+ done
#install
export INSTALL_PACKAGES_ATTEMPTONLY_IPK="${PACKAGE_INSTALL_ATTEMPTONLY}"