Description of problem: With this build: http://koji.fedoraproject.org/koji/taskinfo?taskID=2211258 Build failed with -------------------------------------------------------- Package dbus-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `dbus-1.pc' to the PKG_CONFIG_PATH environment variable Package 'dbus-1', required by 'gconf', not found -------------------------------------------------------- Now rpmbuild detects and adds pkgconfig based dependency, the issue like this should not occur (because GConf2-devel is surely in buildroot!) gconf-2.0.pc says: ------------------------------------------------------ Requires: glib-2.0 Requires.private: ORBit-2.0 dbus-1 ------------------------------------------------------ However with GConf2-devel-2.31.3-1.fc14.i686 : http://koji.fedoraproject.org/koji/rpminfo?rpmID=1990870 Requires(dbus-1) does not appear in Requires. On the other hand, with GConf2-devel-2.28.1-1.fc13.i686: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1896589 Requires(dbus-1) is actually there. /usr/lib/rpm/pkgconfigdeps.sh says: ======================================================= 34 -R|--requires) 35 while read filename ; do 36 case "${filename}" in 37 *.pc) 38 i="`expr $i + 1`" 39 [ $i -eq 1 ] && echo "$pkgconfig" 40 DIR="`dirname ${filename}`" 41 export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" 42 $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do 43 [ -n "$n" ] || continue 44 echo -n "pkgconfig($n) " 45 [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v" 46 echo 47 done 48 esac ====================================================== so the dependency detection by rpmbuild uses the result of "pkg-config --print-requires". With pkgconfig-0.23-9.fc12.i686: $ pkg-config --print-requires ./gconf-2.0.pc glib-2.0 ORBit-2.0 dbus-1 glib-2.0 With pkgconfig-0.24-2.fc14.i686: $ pkg-config --print-requires ./gconf-2.0.pc glib-2.0 And even if with pkgconfig-0.24-2.fc14.i686, even if --print-requires only returns glib-2.0, if dbus-1.pc is not found, pkg-config shows the error: $ pkg-config --cflags gconf-2.0 Package dbus-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `dbus-1.pc' to the PKG_CONFIG_PATH environment variable Package 'dbus-1', required by 'gconf', not found Version-Release number of selected component (if applicable): pkgconfig-0.24-2.fc14 How reproducible: 100%
(In reply to comment #0) > However with GConf2-devel-2.31.3-1.fc14.i686 : > http://koji.fedoraproject.org/koji/rpminfo?rpmID=1990870 > Requires(dbus-1) does not appear in Requires. On the other hand, > with GConf2-devel-2.28.1-1.fc13.i686: > http://koji.fedoraproject.org/koji/rpminfo?rpmID=1896589 > Requires(dbus-1) is actually there. > should be read as "pkgconfig(dbus-1)".
What happened here is that our patch to add --print-requires finally moved upstream. But on the way, it got split up into --print-requires and --print-requires-private. To keep the same behavior, find-requires.pkg-config needs to be updated to pass both options to pkg-config.
Created attachment 417064 [details] patch I'd be happy to build this if you have no objections
(In reply to comment #3) > Created an attachment (id=417064) [details] > patch > > I'd be happy to build this if you have no objections Seems good to me (this patch should only be applied to rawhide redhat-rpm-config, because pkg-config 0.23 does not seem to accept --print-requires-private).
Good to hear it finally got upstreamed. Just FYI, find-requires.pkg-config isn't what normally gets used. It only runs when the internal dependency generator is disabled (which is strongly frowned upon in Fedora as various important bits are missed by the older, external dep generator). What really needs patching is this in rpm's main macros file (will fix): %__pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires
Oops, of course its pkgconfigdeps.sh which needs patching, the arguments from the macro dont directly reflect what pkgconfigdeps.sh calls pkg-config with. Anyway, fixed in both rpm-4.8.0-16.fc14 and redhat-rpm-config-9.1.0-5.fc14 now.
I rebuilt GConf2 and it seems good, thank you.