summaryrefslogtreecommitdiff
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-12-22 16:55:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-03 12:12:36 +0000
commit42c1562fdff2ff52e13e0f77ed13e7a8b578a8fe (patch)
tree8818b8efc19cdd66a3076af8ceb3840af33a9d4a /meta/classes/rootfs_rpm.bbclass
parentcbd8ce300076b7a570d556557f7051552524270d (diff)
downloadtizen-distro-42c1562fdff2ff52e13e0f77ed13e7a8b578a8fe.tar.gz
tizen-distro-42c1562fdff2ff52e13e0f77ed13e7a8b578a8fe.tar.bz2
tizen-distro-42c1562fdff2ff52e13e0f77ed13e7a8b578a8fe.zip
classes/rootfs_rpm: handle recommends in query functions
Implement list_package_recommends() for rpm, and filter out the "suggests" (RPM's equivalent of recommends) in list_package_depends(). Respectively, these changes fix buildhistory handling of recommends for RPM (so that they are included in the image graphs) and also prevents failures during do_rootfs with buildhistory enabled if a recommend is unsatisfied. (From OE-Core rev: b6787f5d6e181d8c39cce7b050e261d1a1d1b075) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 5fd45d758c..966b074181 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -174,7 +174,9 @@ get_package_filename() {
list_package_depends() {
pkglist=`list_installed_packages`
- for req in `${RPM_QUERY_CMD} -q --qf "[%{REQUIRES}\n]" $1`; do
+ # REQUIRE* lists "soft" requirements (which we know as recommends and RPM refers to
+ # as "suggests") so filter these out with the help of awk
+ for req in `${RPM_QUERY_CMD} -q --qf "[%{REQUIRENAME} %{REQUIREFLAGS}\n]" $1 | awk '{ if( and($2, 0x80000) == 0) print $1 }'`; do
if echo "$req" | grep -q "^rpmlib" ; then continue ; fi
realpkg=""
@@ -193,7 +195,7 @@ list_package_depends() {
}
list_package_recommends() {
- :
+ ${RPM_QUERY_CMD} -q --suggests $1
}
install_all_locales() {