diff options
author | Chris Elston <celston@katalix.com> | 2011-07-11 13:14:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-12 15:08:20 +0100 |
commit | 1e433eef8f0eb5c29c80540702d52abae124d42c (patch) | |
tree | cae44bb0d8d4b4c5a7e88dadf107944f22f2d370 /meta/classes/rootfs_ipk.bbclass | |
parent | b8e12e91bbe9f8ea4a1788733f7ddb9a1cc3a614 (diff) | |
download | poky-1e433eef8f0eb5c29c80540702d52abae124d42c.tar.gz |
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.
(From OE-Core rev: 2b6900ad73919a0ecb8c5f1de31744ce7afe65f5)
Signed-off-by: Chris Elston <celston@katalix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 20 |
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" | |||
20 | 20 | ||
21 | opkglibdir = "${localstatedir}/lib/opkg" | 21 | opkglibdir = "${localstatedir}/lib/opkg" |
22 | 22 | ||
23 | # Which packages to not install on the basis of a recommendation | ||
24 | BAD_RECOMMENDATIONS ?= "" | ||
25 | |||
23 | fakeroot rootfs_ipk_do_rootfs () { | 26 | fakeroot rootfs_ipk_do_rootfs () { |
24 | set -x | 27 | set -x |
25 | 28 | ||
@@ -29,6 +32,23 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
29 | ${OPKG_PREPROCESS_COMMANDS} | 32 | ${OPKG_PREPROCESS_COMMANDS} |
30 | 33 | ||
31 | mkdir -p ${T}/ | 34 | mkdir -p ${T}/ |
35 | |||
36 | STATUS=${IMAGE_ROOTFS}${opkglibdir}/status | ||
37 | mkdir -p ${IMAGE_ROOTFS}${opkglibdir} | ||
38 | |||
39 | opkg-cl ${IPKG_ARGS} update | ||
40 | |||
41 | # prime the status file with bits that we don't want | ||
42 | for i in ${BAD_RECOMMENDATIONS}; do | ||
43 | pkginfo="`opkg-cl ${IPKG_ARGS} info $i`" | ||
44 | if [ ! -z "$pkginfo" ]; then | ||
45 | echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS | ||
46 | echo "Status: deinstall ok not-installed" >> $STATUS | ||
47 | echo >> $STATUS | ||
48 | else | ||
49 | echo "Requested ignored recommendation $i is not a package" | ||
50 | fi | ||
51 | done | ||
32 | 52 | ||
33 | #install | 53 | #install |
34 | export INSTALL_PACKAGES_ATTEMPTONLY_IPK="${PACKAGE_INSTALL_ATTEMPTONLY}" | 54 | export INSTALL_PACKAGES_ATTEMPTONLY_IPK="${PACKAGE_INSTALL_ATTEMPTONLY}" |