You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2002/03/14 02:41:12 UTC

Re: cvs commit: apr/build apr_common.m4

Weird... I'm guessing you don't have problems with the other
usages of ${}... $3 should be special enough not to require.
I'll back this out since shells that *don't* support it
are more broken :)

Brian Havard wrote:
> 
> On 13 Mar 2002 18:13:02 -0000, jim@apache.org wrote:
> 
> >jim         02/03/13 10:13:02
> >
> >  Modified:    build    apr_common.m4
> >  Log:
> >  Fix weird error report... not sure what
> >  brain damaged shell would misinterpret the current method, but
> >  this safes it.
> >  
> >  Revision  Changes    Path
> >  1.26      +1 -1      apr/build/apr_common.m4
> >  
> >  Index: apr_common.m4
> >  ===================================================================
> >  RCS file: /home/cvs/apr/build/apr_common.m4,v
> >  retrieving revision 1.25
> >  retrieving revision 1.26
> >  diff -u -r1.25 -r1.26
> >  --- apr_common.m4	8 Mar 2002 17:56:14 -0000	1.25
> >  +++ apr_common.m4	13 Mar 2002 18:13:02 -0000	1.26
> >  @@ -589,7 +589,7 @@
> >   dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
> >   dnl    $final_path now contains "bar"
> >   AC_DEFUN(APR_PATH_RELATIVE,[
> >  -stripped=`echo $2 | sed -e "s#^$3##"`
> >  +stripped=`echo $2 | sed -e "s#^${3}##"`
> >   # check if the stripping was successful
> >   if test "x$2" != "x$stripped"; then
> >       # it was, so strip of any leading slashes
> 
> Unfortuntely that breaks it for me. The generated code in Apache's
> configure changes from:
> 
> stripped=`echo $ap_sysconfdir | sed -e "s#^$prefix##"`
> 
> to
> 
> stripped=`echo $ap_sysconfdir | sed -e "s#^${3}##"`
> 
> which is obviously wrong & I end up with an absolute SERVER_CONFIG_FILE
> again.
> 
> -- 
>  ______________________________________________________________________________
>  |  Brian Havard                 |  "He is not the messiah!                   |
>  |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
>  ------------------------------------------------------------------------------
> 


-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

Re: cvs commit: apr/build apr_common.m4

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Mar 14, 2002 at 12:50:43PM +1000, Brian Havard wrote:
> On Wed, 13 Mar 2002 20:41:12 -0500 (EST), Jim Jagielski wrote:
> 
> >Weird... I'm guessing you don't have problems with the other
> >usages of ${}... $3 should be special enough not to require.
> >I'll back this out since shells that *don't* support it
> >are more broken :)
> 
> Thanks (wow, that was quick :)
> Isn't it an M4 expansion that's going on here though? The $3 represents the
> third parameter to the APR_PATH_RELATIVE M4 macro, not to the shell script.

Yup.

I think we need more info on the original report to figure out what was
going on, and to find a good way to solve it. We might need an temporary
shell variable to hold some of the $3 output.

Another change might be to not use '#' for the sed regex terminators. Use
something like ','.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apr/build apr_common.m4

Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Wed, 13 Mar 2002 20:41:12 -0500 (EST), Jim Jagielski wrote:

>Weird... I'm guessing you don't have problems with the other
>usages of ${}... $3 should be special enough not to require.
>I'll back this out since shells that *don't* support it
>are more broken :)

Thanks (wow, that was quick :)
Isn't it an M4 expansion that's going on here though? The $3 represents the
third parameter to the APR_PATH_RELATIVE M4 macro, not to the shell script.



>Brian Havard wrote:
>> 
>> On 13 Mar 2002 18:13:02 -0000, jim@apache.org wrote:
>> 
>> >jim         02/03/13 10:13:02
>> >
>> >  Modified:    build    apr_common.m4
>> >  Log:
>> >  Fix weird error report... not sure what
>> >  brain damaged shell would misinterpret the current method, but
>> >  this safes it.
>> >  
>> >  Revision  Changes    Path
>> >  1.26      +1 -1      apr/build/apr_common.m4
>> >  
>> >  Index: apr_common.m4
>> >  ===================================================================
>> >  RCS file: /home/cvs/apr/build/apr_common.m4,v
>> >  retrieving revision 1.25
>> >  retrieving revision 1.26
>> >  diff -u -r1.25 -r1.26
>> >  --- apr_common.m4	8 Mar 2002 17:56:14 -0000	1.25
>> >  +++ apr_common.m4	13 Mar 2002 18:13:02 -0000	1.26
>> >  @@ -589,7 +589,7 @@
>> >   dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
>> >   dnl    $final_path now contains "bar"
>> >   AC_DEFUN(APR_PATH_RELATIVE,[
>> >  -stripped=`echo $2 | sed -e "s#^$3##"`
>> >  +stripped=`echo $2 | sed -e "s#^${3}##"`
>> >   # check if the stripping was successful
>> >   if test "x$2" != "x$stripped"; then
>> >       # it was, so strip of any leading slashes
>> 
>> Unfortuntely that breaks it for me. The generated code in Apache's
>> configure changes from:
>> 
>> stripped=`echo $ap_sysconfdir | sed -e "s#^$prefix##"`
>> 
>> to
>> 
>> stripped=`echo $ap_sysconfdir | sed -e "s#^${3}##"`
>> 
>> which is obviously wrong & I end up with an absolute SERVER_CONFIG_FILE
>> again.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------