]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/rootfs_deb: use more reliable check for package existence
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 9 Jul 2012 12:38:39 +0000 (13:38 +0100)
committerSaul Wold <sgw@linux.intel.com>
Mon, 16 Jul 2012 15:36:56 +0000 (08:36 -0700)
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>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/rootfs_deb.bbclass

index 4ea71daedcbaaf540c095925bc787a23f05cd06c..67871a9087ab56516cad36465e2d2232d4e05611 100644 (file)
@@ -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
 }