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 728243 - do not override program_VERSION
do not override program_VERSION
Status: RESOLVED FIXED
Product: gnome-common
Classification: Core
Component: general
git master
Other OpenBSD
: Normal normal
: ---
Assigned To: Gnome Common Maintainer(s)
Gnome Common Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-04-15 08:36 UTC by Antoine Jacoutot
Modified: 2014-04-15 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set ${vc_variable}_VERSION as local (739 bytes, patch)
2014-04-15 08:36 UTC, Antoine Jacoutot
accepted-commit_now Details | Review

Description Antoine Jacoutot 2014-04-15 08:36:14 UTC
Created attachment 274338 [details] [review]
set ${vc_variable}_VERSION as local

Hi.

Trying to build the latest gnome-common in jhbuild on OpenBSD fails with:

checking for automake >= 1.9...
  testing automake... found 1.14.1
checking for autoreconf >= 2.53...
  testing autoreconf... found 2.69
/usr/local/bin/aclocal[35]: /usr/local/bin/aclocal-1.14.1: not found
Checking for forbidden M4 macros...
Processing ./configure.ac
Running autoreconf...
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal  --output=aclocal.m4t
/usr/local/bin/aclocal[35]: /usr/local/bin/aclocal-1.14.1: not found
autoreconf-2.69: aclocal failed with exit status: 127

Now, on OpenBSD, autoconf, automake, aclocal and friends are wrappers that call the actual command according to AUTOMAKE_VERSION and AUTOCONF_VERSION.
The naming is program-MAJOR.MINOR which allows us to install several auto* versions and pick the one we want. We do not install automake X.Y.Z as automake-X.Y.Z because we only want one version of automake X.Y (it makes sense to have several major versions installed, but not minor ones).

e.g:
$ automake --version | head -1                       
Provide an AUTOMAKE_VERSION environment variable, please
$ AUTOMAKE_VERSION=1.14 automake --version | head -1 
automake (GNU automake) 1.14.1

Now what happens with gnome-common is since this commit:
b6f099488526288ad0ab1b2061304441df0b2466
we are checking the automake version against $REQUIRED_AUTOMAKE_VERSION by using
the version_check() function. Unfortunately, this function leaks AUTOMAKE_VERSION to the environment by using an eval:
eval ${vc_variable}_VERSION=$vc_actual_version
which in our case transforms as:
eval AUTOMAKE_VERSION=1.14.1
overriding our own provided AUTOMAKE_VERSION.

This diff make ${vc_variable}_VERSION a local variable so that it does not go out of the function.

Thoughts?
Comment 1 David King 2014-04-15 08:47:03 UTC
Comment on attachment 274338 [details] [review]
set ${vc_variable}_VERSION as local

Thanks for the patch, it looks fine to me.
Comment 2 Antoine Jacoutot 2014-04-15 13:09:37 UTC
Thanks David. Pushed as d213283.