Skip to contentSkip to conversation

Fix buildhistory issue with recommends and RPM

PATCH Applied Paul Eggleton 2 participants 3 messages Dec 22, 2011 – Jan 3, 2012

lore
Share & tools
lore
#0 lore raw

cover Fix buildhistory issue with recommends and RPM

The following changes since commit db446421933d640528328e46a29f828a36d6649b:

multilib.conf: Enable shadow-sysroot and libffi (2011-12-21 17:24:37 +0000)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/rpm-suggests
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/rpm-suggests

Paul Eggleton (1):
classes/rootfs_rpm: handle recommends in query functions

 meta/classes/rootfs_rpm.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 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.

---
 meta/classes/rootfs_rpm.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
meta/classes/rootfs_rpm.bbclass +4 -2
index 5fd45d7..966b074 100644
@@ -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() {
Signature · 1 line
1.7.5.4
Applied
#2 lore raw
In reply to Paul Eggleton
Quoted 8 lines · Paul Eggleton

The following changes since commit db446421933d640528328e46a29f828a36d6649b:

   multilib.conf: Enable shadow-sysroot and libffi (2011-12-21 17:24:37 +0000)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/rpm-suggests
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/rpm-suggests

Quoted 6 lines

Paul Eggleton (1):
classes/rootfs_rpm: handle recommends in query functions

  meta/classes/rootfs_rpm.bbclass |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

Merged into OE-Core

Thanks
Sau!