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 550006 - autogen.sh doesn't correctly handle quotes ", passing environment args fail
autogen.sh doesn't correctly handle quotes ", passing environment args fail
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: common
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-31 03:06 UTC by Craig Keogh
Modified: 2009-11-01 14:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
handle quotes correctly (3.35 KB, patch)
2008-08-31 03:13 UTC, Craig Keogh
none Details | Review
patch (1.69 KB, patch)
2008-08-31 04:28 UTC, David Schleef
reviewed Details | Review
few typos (1.65 KB, patch)
2008-08-31 04:54 UTC, Craig Keogh
rejected Details | Review

Description Craig Keogh 2008-08-31 03:06:57 UTC
I can't autogen.sh like this:

./autogen.sh -- --prefix CFLAGS="-g -O0"

as autogen.sh and gst-autogen.sh doesn't handle quotes "" correctly.
Comment 1 Craig Keogh 2008-08-31 03:13:40 UTC
Created attachment 117672 [details] [review]
handle quotes correctly

The problem was caused by common/gst-autogen.sh converts the command line arguments to a string CONFIGURE_EXT_OPT, but doesn't handle ". This patch, rather than converting to string, uses "$@". The patch still supports the '--' feature of autogen.sh, and --noconfigure, --nocheck, --debug, etc features of autogen.sh
Comment 2 David Schleef 2008-08-31 03:58:39 UTC
I think it would be better to fix this:

Index: autogen.sh
===================================================================
RCS file: /cvs/gstreamer/gstreamer/autogen.sh,v
retrieving revision 1.113
diff -u -r1.113 autogen.sh
--- autogen.sh  10 Jan 2008 12:14:04 -0000      1.113
+++ autogen.sh  31 Aug 2008 03:57:44 -0000
@@ -27,7 +27,7 @@

 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-failing-tests --enable-poi

-autogen_options $@
+autogen_options "$@"

 echo -n "+ check for build tools"
 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
Comment 3 David Schleef 2008-08-31 04:28:58 UTC
Created attachment 117674 [details] [review]
patch

Ignore that, I see the problem now.

Here's a less invasive patch.
Comment 4 Craig Keogh 2008-08-31 04:54:38 UTC
Created attachment 117676 [details] [review]
few typos

Cool, you're patch fixes the problems, apart from a few typos:

+while test "x$1" != "x" ; do

should be

+while test ! "x$1" = "x" ; do

and don't do this bit, as it doesn't work:

-  if test ! -z "$CONFIGURE_EXT_OPT"
+  if test ! -z "$CONFIGURE_EXT_OPT $@"
Comment 5 David Schleef 2008-08-31 16:48:31 UTC
Those aren't typos.
Comment 6 Craig Keogh 2008-08-31 23:51:15 UTC
The following line resulted in an error on my system (Ubuntu intrepid):
while test "x$1" != "x" ; do

The following line resulted in an error on my system:
if test ! -z "$CONFIGURE_EXT_OPT $@"
Comment 7 David Schleef 2008-09-01 03:08:40 UTC
What value of $1 did it choke on?
Comment 8 Craig Keogh 2008-09-01 09:39:09 UTC
with patch at attachment 117674 [details] [review] :
using:

./autogen.sh -- --prefix /opt/gnome2 --libdir '${exec_prefix}/lib64' --disable-tests --disable-static --disable-gtk-doc CFLAGS="-g -O0" 

I get the error:
test: 30: /opt/gnome2: unexpected operator
Comment 9 David Schleef 2008-09-01 21:39:16 UTC
What shell (and version) are you using?
Comment 10 Craig Keogh 2008-09-02 09:49:46 UTC
/bin/sh is dash. dash version 0.5.4-9ubuntu1.
Comment 11 Sebastian Dröge (slomo) 2009-07-29 13:19:22 UTC
Any progress or news on this?
Comment 12 Sebastian Dröge (slomo) 2009-07-29 13:21:46 UTC
Also apparently both patches don't work but IMHO David's patch should already be committed as is because it fixes at least some potential problems. David?
Comment 13 David Schleef 2009-07-29 18:02:29 UTC
Should be flagged as WONTFIX, since this is impossible to do correctly without significant work, and the workarounds are trivial.
Comment 14 Tim-Philipp Müller 2009-11-01 14:41:12 UTC
Resolving as WONTFIX as per David's comment.

(If portability is a concern, one could just change autogen.sh to use /bin/bash instead... ;-))