All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/3] classes/rootfs_deb: use more reliable check for package existence
Date: Wed, 11 Jul 2012 14:04:32 +0100	[thread overview]
Message-ID: <2180f501590f39f8c84c553f158635c2526f099d.1342011575.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1342011575.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1342011575.git.paul.eggleton@linux.intel.com>

It turns out "apt-cache showpkg" does return some information when a
package does not exist but another package recommends it, which can
occur for empty *-dev packages; so use "apt-cache policy" with a
different line count instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/rootfs_deb.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 4ea71da..67871a9 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -111,7 +111,7 @@ list_package_recommends() {
 }
 
 rootfs_check_package_exists() {
-	if [ `apt-cache showpkg $1 | wc -l` -gt 2 ]; then
+	if [ `apt-cache policy $1 | wc -l` -gt 4 ]; then
 		echo $1
 	fi
 }
-- 
1.7.9.5




  reply	other threads:[~2012-07-11 13:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 13:04 [PATCH 0/3] rootfs generation improvements Paul Eggleton
2012-07-11 13:04 ` Paul Eggleton [this message]
2012-07-11 13:04 ` [PATCH 2/3] Rework installation of dev, dbg, doc, and locale packages Paul Eggleton
2012-07-11 13:04 ` [PATCH 3/3] classes/image: add staticdev-pkgs IMAGE_FEATURES feature Paul Eggleton
2012-07-17 16:01 ` [PATCH 0/3] rootfs generation improvements Saul Wold
2012-07-23 10:29   ` Paul Eggleton

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=2180f501590f39f8c84c553f158635c2526f099d.1342011575.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.