RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/db3/ configure

From: Mark Hatle <mark.hatle@windriver.com>
Date: Wed 27 Jun 2007 - 23:25:02 CEST
Message-ID: <4682D5AE.7020400@windriver.com>
This actually points out a bug I found the other day, but haven't been
able to figure out how to solve.

Using "echo $*" in this way causes variable or argument expansions that
include a "space" to fail.

We have a few cases where we need to pass in CFLAGS w/ multiple elements
or CC='distcc ccache foo-gcc -te500v1'.. which causes a failure to occur.

I replaced the args bit with a simple "$@" in the args list to work
around the issue.. but I don't know of a way of modifying the arguments
in the shell and passing them properly quoted.

--Mark

>   patch -p0 <<'@@ .'
>   Index: rpm/db3/configure
>   ============================================================================
>   $ cvs diff -u -r1.31 -r1.32 configure
>   --- rpm/db3/configure	27 Jun 2007 18:05:12 -0000	1.31
>   +++ rpm/db3/configure	27 Jun 2007 21:18:48 -0000	1.32
>   @@ -9,6 +9,8 @@
>    
>    ARGS="`echo $* |\
>           sed -e 's% [^ ]*CFLAGS=[^ ]*%%' \
>   +           -e 's% [^ ]*CC=[^ ]*ccache [^ ]*%%' \
>   +           -e 's% [^ ]*CC=[^ ]*%%' \
>               -e 's% -[^-][^ ]*%%g' \
>               -e 's% --param=[^ ]*%%g' \
>               -e 's%--cache-file=.*$%%' \
>   @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Wed Jun 27 23:25:08 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.