After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680363 - gnome-common: gnome-autogen.sh: version_check() fails for pkgconf (alternative pkg-config implementation)
gnome-common: gnome-autogen.sh: version_check() fails for pkgconf (alternativ...
Status: RESOLVED INCOMPLETE
Product: gnome-common
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Gnome Common Maintainer(s)
Gnome Common Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-07-21 10:47 UTC by Samuli Suominen
Modified: 2014-05-02 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
autogen-fix.patch (1.64 KB, patch)
2012-07-21 20:33 UTC, William Pitcock
needs-work Details | Review

Description Samuli Suominen 2012-07-21 10:47:49 UTC
`pkg-config --version` is a "wrong way" to check for working pkg-config, there are better ways that don't break the alternative implementations, like `pkg-config --atleast-version 0.14`, `pkg-config --atleast-pkgconfig-version 0.14`, or even `pkg-config --modversion pkg-config`

$ pkg-config --version | head -n 1
pkgconf 0.8.1 [pkg-config compatible]

pkgconf is an alternative implemntation of the freedesktop.org pkg-config package, here: http://github.com/nenolod/pkgconf


there are also others, namely OpenBSD's pkg-config but it will print 0.26 with --version, here: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/pkg-config/
and the ruby version, here: http://github.com/rcairo/pkg-config (no idea what it prints as it's version)
and the fork from freedesktop.org's copy, here: http://sourceforge.net/projects/pkgconfiglite/ (this will print same as freedesktop.org's pkg-config)
Comment 1 Samuli Suominen 2012-07-21 10:49:34 UTC
original bug report (downstream / distribution):

http://bugs.gentoo.org/show_bug.cgi?id=427432

with pkgconf upstream commenting there on Comment #1

way to reproduce in Comment #3
Comment 2 William Pitcock 2012-07-21 20:33:01 UTC
Created attachment 219396 [details] [review]
autogen-fix.patch

Fixes the bug by using --modversion instead of --version.
Comment 3 David King 2012-07-30 16:21:48 UTC
Review of attachment 219396 [details] [review]:

::: macros2/gnome-autogen.sh
@@ +99,3 @@
+    # The most reliable way to check pkg-config version is to query the actual virtual
+    # pkg-config package entry's modversion.  This works in all known implementations.
+    if test "x$vc_option" = "xpkg-config"; then

I guess that should read ‘if test "x$vc_checkprog" = "xpkg-config"; then’?
Comment 4 David King 2014-05-02 16:04:40 UTC
Without any feedback I will not apply the patch, so if someone is interested, please test it, making the required change, and report back if it works.