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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
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=""
}
list_package_recommends() {
- :
+ ${RPM_QUERY_CMD} -q --suggests $1
}
install_all_locales() {