Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Chris Elston <celston@katalix.com>
To: Saul Wold <sgw@linux.intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] Add support for BAD_RECOMMENDATIONS to rootfs_ipk
Date: Mon, 11 Jul 2011 09:53:46 +0100	[thread overview]
Message-ID: <1310374426.10512.3.camel@desktop.home> (raw)
In-Reply-To: <4E14E0C7.6040604@linux.intel.com>

On Wed, 2011-07-06 at 15:25 -0700, Saul Wold wrote:
> On 07/01/2011 02:20 AM, Phil Blundell wrote:
> > On Fri, 2011-07-01 at 10:06 +0100, Chris Elston wrote:
> >> +	STATUS=${IMAGE_ROOTFS}/var/lib/opkg/status
> >
> > Please make that use ${opkglibdir} like the rest of the class does.
> > Otherwise this patch looks pretty good to me.
> >
> > p.
> >
> >
> Chris,
> 
> Are you going to republish with this change?
> 
> Sau!

Saul,

Revised with Phil's suggested change:

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>

---
 meta/classes/rootfs_ipk.bbclass |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/meta/classes/rootfs_ipk.bbclass
b/meta/classes/rootfs_ipk.bbclass
index edd84fb..bf15f4c 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
 
@@ -30,6 +33,21 @@ fakeroot rootfs_ipk_do_rootfs () {
 
        mkdir -p ${T}/
 
+       STATUS=${IMAGE_ROOTFS}${opkglibdir}/status
+       mkdir -p `dirname ${STATUS}`
+
+       opkg-cl ${IPKG_ARGS} update
+
+       # prime the status file with bits that we don't want
+       for i in ${BAD_RECOMMENDATIONS}; do
+               infln="`opkg-cl ${IPKG_ARGS} info $i | grep -e
'^Package:' -e '^Architecture:' -e '^Version:'`"
+               if [ ! -z "$infln" ]; then
+                       echo "$infln" >> $STATUS
+                       echo "Status: deinstall ok not-installed" >>
$STATUS
+                       echo >> $STATUS
+               fi
+       done
+
        #install
        export
INSTALL_PACKAGES_ATTEMPTONLY_IPK="${PACKAGE_INSTALL_ATTEMPTONLY}"
        export INSTALL_PACKAGES_LINGUAS_IPK="${LINGUAS_INSTALL}"
-- 
1.6.2.5




  reply	other threads:[~2011-07-11  9:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 11:10 [PATCH] Add support for BAD_RECOMMENDATIONS to rootfs_ipk Chris Elston
2011-06-30 23:13 ` Saul Wold
2011-07-01  9:06   ` Chris Elston
2011-07-01  9:20     ` Phil Blundell
2011-07-06 22:25       ` Saul Wold
2011-07-11  8:53         ` Chris Elston [this message]
2011-07-11  9:00           ` Phil Blundell
2011-07-11 12:14             ` Chris Elston
2011-07-12 14:02               ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310374426.10512.3.camel@desktop.home \
    --to=celston@katalix.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox