Hi there,
Whilst working on Poky/OpenEmbedded I found the need to list all of the hard
dependencies of an RPM package within a shell script. Unfortunately --requires
or the REQUIRES tag seem to also include "soft" dependencies (i.e.
"suggests") which is not really what I need. FYI we're using RPM 5.4.0.
After a little digging I found REQUIREFLAGS, here's an example listing from
our system:
-------------------- snip --------------------
paul@helios:~/poky/poky/build$
/home/paul/poky/poky/build/tmp/sysroots/i686-linux/usr/bin/rpm --dbpath
/var/lib/rpm
--root=/home/paul/poky/poky/build/tmp/work/qemux86-poky-linux/core-image-sato-1.0-r0/rootfs
-q --qf "[%{REQUIRENAME} %{REQUIREFLAGS}\n]" connman-gnome
libglib-2.0-0 12
hicolor-icon-theme 0
libdbus-glib-1-2 12
libgtk-2.0 12
libc6 12
connman-plugin-loopback 524288
connman 524288
python 524288
python-dbus 524288
connman-plugin-dnsproxy 524288
connman-plugin-bluetooth 524288
connman-plugin-udhcp 524288
connman-plugin-ofono 524288
connman-plugin-wifi 524288
connman-plugin-ethernet 524288
connman-plugin-fake 524288
/bin/sh 1280
/bin/sh 4352
rtld(GNU_HASH) 16384
libgtk-x11-2.0.so.0 16384
libdbus-glib-1.so.2 16384
libc.so.6(GLIBC_2.0) 16384
libc.so.6(GLIBC_2.2) 16384
libgdk-x11-2.0.so.0 16384
libgobject-2.0.so.0 16384
libpthread.so.0 16384
libglib-2.0.so.0 16384
libc.so.6 16384
-------------------- snip --------------------
These values are not ideal for filtering via a shell script and I don't know
what the values mean. Mark Hatle pointed me to its fflags modifier which does
appear to translate some of the flags but not for the suggests (e.g.
connman-plugin-* above), here's what it says for the same package:
-------------------- snip --------------------
paul@helios:~/poky/poky/build$
/home/paul/poky/poky/build/tmp/sysroots/i686-linux/usr/bin/rpm --dbpath
/var/lib/rpm
--root=/home/paul/poky/poky/build/tmp/work/qemux86-poky-linux/core-image-sato-1.0-r0/rootfs
-q --qf "[%{REQUIRENAME} %{REQUIREFLAGS:fflags}\n]" connman-gnome
libglib-2.0-0 m
hicolor-icon-theme
libdbus-glib-1-2 m
libgtk-2.0 m
libc6 m
connman-plugin-loopback
connman
python
python-dbus
connman-plugin-dnsproxy
connman-plugin-bluetooth
connman-plugin-udhcp
connman-plugin-ofono
connman-plugin-wifi
connman-plugin-ethernet
connman-plugin-fake
/bin/sh r
/bin/sh r
rtld(GNU_HASH)
libgtk-x11-2.0.so.0
libdbus-glib-1.so.2
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.2)
libgdk-x11-2.0.so.0
libgobject-2.0.so.0
libpthread.so.0
libglib-2.0.so.0
libc.so.6
-------------------- snip --------------------
Any suggestions? Would we need to look at patching RPM to implement better
expansion of the flags? If so, are these flags documented anywhere or is the
source the only reference?
(Clearly some of this might be related to our specific configuration of RPM
within Poky/OE, in which case I'll defer to Mark for further elaboration on
that if needed.)
Thanks,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List [email protected]