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 121635 - autogen.sh version checks fail on certain conditions
autogen.sh version checks fail on certain conditions
Status: VERIFIED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: dont know
0.6.3
Other All
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-09-06 22:04 UTC by Manuel Menal
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Manuel Menal 2003-09-06 22:04:09 UTC
The gst-autogen.sh script used by GStreamer in two places does its
version checks in a way that make them fail on certain conditions -
specifically using the latest libtool available for Debian Unstable. The
problem is that this line:

pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*) //'|sed 's/(.*)//'`

.. assumes that there is only one set of parenthesis in the version line, which
happens to be wrong in my case. (this is due to the fact that .* is greedy, so
it will catch the first ')' without any trouble). Here is my version line :

ltmain.sh (GNU libtool) 1.5.0a (1.1220.2.25 2003/08/01 19:08:35) Debian: 49 $

And here is a simple patch for this :

diff -Nurp gstreamer-0.6.3.old/common/gst-autogen.sh gstreamer-0.6.3/common/gst-autogen.sh
--- gstreamer-0.6.3.old/common/gst-autogen.sh	2003-09-06 23:49:18.000000000 +0200
+++ gstreamer-0.6.3/common/gst-autogen.sh	2003-09-06 23:49:58.000000000 +0200
@@ -63,7 +63,7 @@ version_check ()
     # the following line is carefully crafted sed magic
     # you don't want to mess with it
     #pkg_version=`$COMMAND --version|head -n 1|sed 's/^[a-zA-z\.\ ()]*//;s/ .*$//'`
-    pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*) //'|sed 's/ (.*)//'`
+    pkg_version=`$COMMAND --version|head -n 1|sed 's/^[^)]*) //'|sed 's/ (.*)//'`
     debug "pkg_version $pkg_version"
     # remove any non-digit characters from the version numbers to permit numeric
     # comparison
diff -Nurp gstreamer-0.6.3.old/libs/ext/cothreads/common/gst-autogen.sh gstreamer-0.6.3/libs/ext/cothreads/common/gst-autogen.sh
--- gstreamer-0.6.3.old/libs/ext/cothreads/common/gst-autogen.sh	2003-09-06 23:49:19.000000000 +0200
+++ gstreamer-0.6.3/libs/ext/cothreads/common/gst-autogen.sh	2003-09-06 23:50:07.000000000 +0200
@@ -63,7 +63,7 @@ version_check ()
     # the following line is carefully crafted sed magic
     # you don't want to mess with it
     #pkg_version=`$COMMAND --version|head -n 1|sed 's/^[a-zA-z\.\ ()]*//;s/ .*$//'`
-    pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*) //'|sed 's/ (.*)//'`
+    pkg_version=`$COMMAND --version|head -n 1|sed 's/^[^)]*) //'|sed 's/ (.*)//'`
     debug "pkg_version $pkg_version"
     # remove any non-digit characters from the version numbers to permit numeric
     # comparison

I guess sed isn't that magic. ;-)
Comment 1 David Schleef 2003-09-18 19:33:03 UTC
This was fixed a long time ago.  Are you sure you are using updated CVS?
Comment 2 Christian Fredrik Kalager Schaller 2004-11-25 18:03:10 UTC
Closing as fixed.