summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-02-19 21:31:52 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-19 22:37:51 (GMT)
commit6bf55c6e67b371c0467ae1be4d7f713d6a3dcf3b (patch)
treebb1328b6af091aa880c5fb16799b5f06fe0af9e5
parentdb0a02492c2a53c1917b753bcf21c4ee7c0ecf59 (diff)
downloadpoky-6bf55c6e67b371c0467ae1be4d7f713d6a3dcf3b.tar.gz
rootfs_ipkg: fix BAD_RECOMMENDATIONS handling
If multiple versions of the same package are in the package feed then the generate status file would only contains a "deinstall" status for the last one, which meant that BAD_RECOMMENDATIONS wouldn't actually work. Use awk instead of grep and stop reading when we reach a newline, so we only ever output a single stanza. (From OE-Core rev: a5362de60c0051f16b88a40bd9cb41915bee0b0f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/rootfs_ipk.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 135bb60..a609944 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -46,9 +46,13 @@ fakeroot rootfs_ipk_do_rootfs () {
46 for i in ${BAD_RECOMMENDATIONS}; do 46 for i in ${BAD_RECOMMENDATIONS}; do
47 pkginfo="`opkg-cl ${OPKG_ARGS} info $i`" 47 pkginfo="`opkg-cl ${OPKG_ARGS} info $i`"
48 if [ ! -z "$pkginfo" ]; then 48 if [ ! -z "$pkginfo" ]; then
49 echo "$pkginfo" | grep -e '^Package:' -e '^Architecture:' -e '^Version:' >> $STATUS 49 # Take just the first package stanza as otherwise only
50 echo "Status: deinstall hold not-installed" >> $STATUS 50 # the last one will have the right Status line.
51 echo >> $STATUS 51 echo "$pkginfo" | awk "/^Package:/ { print } \
52 /^Architecture:/ { print } \
53 /^Version:/ { print } \
54 /^$/ { exit } \
55 END { print \"Status: deinstall hold not-installed\n\" }" - >> $STATUS
52 else 56 else
53 echo "Requested ignored recommendation $i is not a package" 57 echo "Requested ignored recommendation $i is not a package"
54 fi 58 fi