From patchwork Mon Jul 16 15:47:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [CONSOLIDATED, PULL, 10/30] classes/rootfs_deb: use more reliable check for package existence Date: Mon, 16 Jul 2012 15:47:16 -0000 From: Saul Wold X-Patchwork-Id: 32125 Message-Id: To: openembedded-core@lists.openembedded.org From: Paul Eggleton 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 Signed-off-by: Saul Wold --- meta/classes/rootfs_deb.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 }