Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427432 - gnome-base/gnome-common shouldn't be parsing the result of `pkg-config --version` (for dev-util/pkgconf compability)
Summary: gnome-base/gnome-common shouldn't be parsing the result of `pkg-config --vers...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2012-07-21 05:34 UTC by Samuli Suominen (RETIRED)
Modified: 2014-05-02 17:19 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2012-07-21 05:34:53 UTC
The file "macros2/gnome-autogen.sh" from the gnome-common package is parsing the version output of `pkg-config --version`

pkg-config, pkg-config-lite, pkgconfig-openbsd are all printing the matching freedesktop.org version scheme (0.26, 0.27... for example)

13:56 <@angelos> checking for pkg-config >= 0.14.0... testing pkg-config... too old (found version 0.8)
13:56 <@angelos> yay ;(
14:00 <@ssuominen> :o
14:00 <@angelos> default gnome-autogen.sh settings check for that
14:00  * angelos forced minimum version to 0.1 now
14:00 <@ssuominen> dev-util/pkgconf spits out 0.8 with --version or similar argument and gnome-autogen.sh parses 
                   it?
14:01 <@angelos> yup
14:01 <@ssuominen> the package should be getting the version string from the pkg.m4 (which is same for every 
                   implemantation)
14:02 <@angelos> tell the gnome guys, gnome-autogen.sh is part of gnome-base/gnome-common :P
14:02 <@ssuominen> dev-util/pkgconfig-openbsd prints 0.26, as in, the freedesktop.org's pkg-config version string 
                   for compability
14:02 <@angelos> ~ % pkg-config --version
14:02 <@angelos> pkgconf 0.8
14:03 <@ssuominen> yup, propably should just s/0.8/0.27/ (after dealing with bug 426410)
14:03 <+willikins> https://bugs.gentoo.org/426410 "dev-util/pkgconf: pkg.m4 is outdated and no longer in sync with 
                   upstream copy"; Gentoo Linux, Applications; CONF; ssuominen:dev-embedded
Comment 1 William Pitcock 2012-07-21 05:46:49 UTC
Why should I do this?  The correct way to get the pkg-config version for use in scripts is to query the modversion like so:

$ pkg-config --modversion pkg-config

Which pkgconf supports without any problem:

ciaranis:~/dev-src/pkgconf$ pkg-config --modversion pkg-config
0.25
ciaranis:~/dev-src/pkgconf$ ./pkgconf --modversion pkg-config
0.26

Any other way is broken and inherent to errors, and even discouraged by the pkg-config authors.

I'm not doing this upstream, sorry.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2012-07-21 05:51:05 UTC
CCing angelos if he remembers howto reproduce this to determine whetever this should go to gnome@ or closed as invalid...
Comment 3 Christoph Mende (RETIRED) gentoo-dev 2012-07-21 10:08:23 UTC
This is pretty simple to reproduce actually. Just check out any live version of any app using gnome-autogen, for example plank:

~ % bzr branch lp:plank
Branched 659 revisions.                                                        
~ % cd plank
plank % ./autogen.sh 
/usr/bin/gnome-autogen.sh
[...]
checking for pkg-config >= 0.14.0...
  testing pkg-config... too old (found version 0.8)
***Error***: You must have pkg-config >= 0.14.0 installed
  to build plank.  Download the appropriate package for
  from your distribution or get the source tarball at
    'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-0.14.0.tar.gz

Considering there's pkg-config --modversion, I'd say this is a bug in gnome-autogen.sh, which seems rather ugly to fix though. It has a generic version_check(), that just calls (a more complex version of) $pkgtocheck --version.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-07-21 10:26:14 UTC
Moving to gnome-common maintainers then, and this would be an upstream bug too...

$ pkg-config --atleast-version 0.14
$ echo $?
0
$ pkg-config --atleast-pkgconfig-version 0.14
$ echo $?
0
$ pkg-config --version | head -n 1
pkgconf 0.8.1 [pkg-config compatible]
Comment 5 Pacho Ramos gentoo-dev 2012-07-21 10:32:24 UTC
Could you please report this directly to upstream? You will obviously explain the problem better than me to upstream. Thanks a lot
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-07-21 10:51:11 UTC
(In reply to comment #5)
> Could you please report this directly to upstream? You will obviously
> explain the problem better than me to upstream. Thanks a lot

This should suffice, but I'm not going to write the patch. That should be an motivation for the pkgconf maintainers since otherwise pkhconf isn't a valid provider for the virtual...

http://bugzilla.gnome.org/show_bug.cgi?id=680363
Comment 7 Pacho Ramos gentoo-dev 2012-07-21 11:07:16 UTC
OK, thanks
Comment 8 William Pitcock 2012-07-21 20:34:48 UTC
Patch submitted upstream.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2012-07-25 09:39:15 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=680363#c2 needs to get backported (or pkgconf dropped from virtual/pkgconfig)
Comment 10 Jeff (JD) Horelick (RETIRED) gentoo-dev 2012-07-31 02:02:39 UTC
Resolving as fixed since pkgconf --version displays the fd.o pkg-config work-alike version now (since 0.8.4). This should still be fixed by upstream, but it's no longer pkgconf's bug
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2014-05-02 17:19:04 UTC
(In reply to Jeff (JD) Horelick from comment #10)
> Resolving as fixed since pkgconf --version displays the fd.o pkg-config
> work-alike version now (since 0.8.4). This should still be fixed by
> upstream, but it's no longer pkgconf's bug

Yeah, I suppose pkgconf maintainers are fine with --version being stuck to f.d.o pkg-config version, since nobody tested the patch and it got rejected due to lack of testing:

https://bugzilla.gnome.org/show_bug.cgi?id=680363#c4