Bug 8969

Summary: With RPM4, RRECOMMENDS (Suggests:) are not installed
Product: [Build System, Metadata & Runtime] OE-Core Reporter: condo4 <fabien.proriol>
Component: devtools / tool chainAssignee: Joshua Lock <joshuagloe>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: markus.lehtonen, meta.mr.watcher, meta.watcher, tanuk
Version: 2.0.2   
Target Milestone: 2.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description condo4 2016-01-21 10:51:10 UTC
Hello,

I build a new filesystem.
With RPM5, I had no problems, I switched to RPM4, and, on my image, many packages are missing (xserver-xf86-config, xkbcomp for exemple).

It's seem that this packages are linked to my image by
RRECOMMENDS_${PN} += ....

With RPM5, do_rootfs install this packages in the final image
With RPM4, do_rootfs don't install it...

I check the spec file, in both cases, there is following lines:

Suggests: xserver-xorg-security-policy
Suggests: rgb
Suggests: xkeyboard-config
Suggests: xserver-xf86-config
Suggests: xkbcomp

Somethings has an idea of the root cause ?
Comment 1 Markus Lehtonen 2016-01-21 16:12:01 UTC
Upstream of RPM4 now supports weak dependencies. Thus, upgrading RPM4 to, say, v4.13 should fix this issue.
Comment 2 Joshua Lock 2016-01-25 15:24:16 UTC
I've reproduced this issue and begun investigating but sadly haven't quite root caused it yet.

I can confirm that a core-image-sato built with rpm4 doesn't have the contents of xserver-xf86-config nor xkbcomp packages installed, yet the RRECOMMENDS (or Suggests in RPM parlance) information is encoded correctly in the generated RPM:

$ ./tmp-glibc/sysroots/x86_64-linux/usr/bin/rpm -qp --suggests tmp-glibc/deploy/rpm/i586/xserver-xorg-1.18.0-r0.3.i586.rpm
xkbcomp
xkeyboard-config
xserver-xf86-config

The only thing that seems interesting here is that the package xserver-xorg has arch i586, as do the xkeyboard-config and xkbcomp RRECOMMENDS, but the xserver-xf86-config package has MACHINE_ARCH — qemux86 in this instance.

I decided to try and see whether other RRECOMMENDS were being installed in the RPM4 image and discovered that some are, i.e. gtk+ RRECOMMENDS liberation-fonts (amongst other things) and the ttf files are installed in the rootfs.

Taking a look at the gtk+ package:

$ ./tmp-glibc/sysroots/x86_64-linux/usr/bin/rpm -qp --suggests tmp-glibc/deploy/rpm/i586/libgtk-2.0-2.24.28-r0.3.i586.rpm
glibc-gconv-iso8859-1
liberation-fonts
libgdk-pixbuf-2.0-loader-gif
libgdk-pixbuf-2.0-loader-jpeg
libgdk-pixbuf-2.0-loader-png
libgdk-pixbuf-2.0-loader-xpm
shared-mime-info

liberation fonts are all arch, whilst the rest are i586.

At this point it looks like perhaps MACHINE_ARCH RRECOMMENDS aren't being installed?

Testing a couple of others:

$ ./tmp-glibc/sysroots/x86_64-linux/usr/bin/rpm -qp --suggests tmp-glibc/deploy/rpm/i586/connman-1.31-r0.2.i586.rpm
connman-conf
update-rc.d

Indeed, connman-conf is not installed in the rootfs.

It's worth checking that MACHINE_ARCH RDEPENDS (Requires) are being installed:

$ ./tmp-glibc/sysroots/x86_64-linux/usr/bin/rpm -qp --requires tmp-glibc/deploy/rpm/qemux86/packagegroup-core-x11-sato-base-1.0-r33.4.qemux86.rpm
connman-gnome
gtk-sato-engine
libsdl
matchbox-config-gtk
matchbox-desktop
matchbox-keyboard
matchbox-keyboard-applet
matchbox-keyboard-im
matchbox-session-sato
pulseaudio-client-conf-sato
pulseaudio-misc
pulseaudio-server
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
sato-icon-theme
settings-daemon
shutdown-desktop
udev-extraconf
xcursor-transparent-theme

matchbox-session-sato has MACHINE_ARCH and is installed in the rpm4 rootfs. OK, good.

At this point my guess is that MACHINE_ARCH Suggests/RRECOMMENDS aren't being installed. I'd guess this is an issue with the Smart Package Manager and the patch we have to fix RPM4 support[1], however I need to find some more time to investigate that.

Note: I tried updating to RPM 4.13-rc1 before I started digging in to this investigation and, in case the above is too long or unclear, it didn't help. However I'll submit that recipe along with any fixes and improvements for RPM4. My WIP RPM4 changes are in the joshuagl/rpm4 branch of openembedded-core-contrib[2].

1. http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
2. http://cgit.openembedded.org/openembedded-core-contrib/log/?h=joshuagl/rpm4
Comment 3 Joshua Lock 2016-03-22 12:41:41 UTC
As RPM4 was incomplete, buggy and unmaintained we decided to remove it from OE-Core.

We'll be happy to add it back should someone provide a fully functioning solution, but as we don't currently have the manpower to develop and maintain that solution its removal was deemed to be the best option.