You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2003/03/23 04:12:22 UTC

[PATCH] fix apr-config with symlinks

so it looks like apr-config doesn't work when $prefix contains a 
symlink, due to the fact that we use realpath to figure out some paths, 
and cd + pwd to figure out others, so when we try to compare them (for 
determining if we're installed or not), it breaks things.

here's a diff that fixes it on my freebsd 5.0 machine.  (note, a 
similar thing will need to be done for apu-config.in, as it looks like 
it makes the same mistake).

-garrett

--- apr-config.in.orig  Sat Mar 22 22:55:46 2003
+++ apr-config.in       Sat Mar 22 22:56:08 2003
@@ -130,7 +130,7 @@
    APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
  fi
  if test -d $bindir; then
-  tmpbindir="`cd $bindir && pwd`"
+  tmpbindir="`realpath $bindir`"
  else
    tmpbindir=""
  fi


RE: [PATCH] fix apr-config with symlinks

Posted by Sander Striker <st...@apache.org>.
> From: Stas Bekman [mailto:stas@stason.org]
> Sent: Sunday, March 23, 2003 11:33 PM

> William A. Rowe, Jr. wrote:
> 
>> I'm inclined to suggest we stay with 0.9.2 for the next few days as
>> our released version.  Collect a week of feedback; fix all new issues
>> and then roll out 0.9.3.
> 
> Heh, so did you silently drop the 0.9.2-dev => 0.9.2 schema? I thought the 
> next release is going to be 0.9.2?

It is going to be 0.9.2.  The tag is already in place AP[RUI]_0_9_2.

Sander


Re: [PATCH] fix apr-config with symlinks

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Sunday, March 23, 2003 5:39 PM -0600 "William A. Rowe, Jr." 
<wr...@rowe-clan.net> wrote:

>> Heh, so did you silently drop the 0.9.2-dev => 0.9.2 schema? I thought the
>> next release is going to be 0.9.2?
>
> I believe Greg and others argued vocally against that change.  We can
> revisit that decision as we approach 1.0 - but I'd leave it alone for 0.9.
> No consensus was reached either way.

The issue was that APR_0_9_2 was already tagged.  You can't touch it.  It's 
done.  Ship it.

Once the tag happens, you can't go back or change the tag.  Any fixes *after* 
the tag *must* be in the next release.  -- justin

Re: [PATCH] fix apr-config with symlinks

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 04:32 PM 3/23/2003, Stas Bekman wrote:
>William A. Rowe, Jr. wrote:
>
>>I'm inclined to suggest we stay with 0.9.2 for the next few days as
>>our released version.  Collect a week of feedback; fix all new issues
>>and then roll out 0.9.3.
>
>Heh, so did you silently drop the 0.9.2-dev => 0.9.2 schema? I thought the next release is going to be 0.9.2?

I believe Greg and others argued vocally against that change.  We can
revisit that decision as we approach 1.0 - but I'd leave it alone for 0.9.
No consensus was reached either way.

Bill



Re: [PATCH] fix apr-config with symlinks

Posted by Stas Bekman <st...@stason.org>.
William A. Rowe, Jr. wrote:

> I'm inclined to suggest we stay with 0.9.2 for the next few days as
> our released version.  Collect a week of feedback; fix all new issues
> and then roll out 0.9.3.

Heh, so did you silently drop the 0.9.2-dev => 0.9.2 schema? I thought the 
next release is going to be 0.9.2?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: [PATCH] fix apr-config with symlinks

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 09:35 PM 3/22/2003, Justin Erenkrantz wrote:
>--On Saturday, March 22, 2003 7:16 PM -0800 Justin Erenkrantz <ju...@erenkrantz.com> wrote:
>
>>Not all systems have 'realpath.'  Try this.  If it works, I can commit it to
>>all the variants...  *sigh*  -- justin
>
>I committed this to both HEAD of apr and apr-util.  OtherBill can figure out what impact this has on the releasablity of APR 0.9.2.  -- justin

We've been very specific, once we tag a given release, it's done.

That's why we introduced the concept of individual's temporary tags.
I'd laid the first one down about a week ago, a second yesterday.

I'm inclined to suggest we stay with 0.9.2 for the next few days as
our released version.  Collect a week of feedback; fix all new issues
and then roll out 0.9.3.

Seems like we need a copy of STATUS so the users know what is
fixed post-0.9.2

Bill



Re: [PATCH] fix apr-config with symlinks

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Saturday, March 22, 2003 7:16 PM -0800 Justin Erenkrantz 
<ju...@erenkrantz.com> wrote:

> Not all systems have 'realpath.'  Try this.  If it works, I can commit it to
> all the variants...  *sigh*  -- justin

I committed this to both HEAD of apr and apr-util.  OtherBill can figure out 
what impact this has on the releasablity of APR 0.9.2.  -- justin

Re: [PATCH] fix apr-config with symlinks

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Saturday, March 22, 2003 10:12 PM -0500 Garrett Rooney 
<ro...@electricjellyfish.net> wrote:

> here's a diff that fixes it on my freebsd 5.0 machine.  (note, a similar
> thing will need to be done for apu-config.in, as it looks like it makes the
> same mistake).

Not all systems have 'realpath.'  Try this.  If it works, I can commit it to 
all the variants...  *sigh*  -- justin

Index: apr-config.in
===================================================================
RCS file: /home/cvs/apr/apr-config.in,v
retrieving revision 1.31
diff -u -r1.31 apr-config.in
--- apr-config.in	6 Mar 2003 00:14:41 -0000	1.31
+++ apr-config.in	23 Mar 2003 03:14:46 -0000
@@ -123,16 +123,19 @@

 thisdir="`dirname $0`"
 thisdir="`cd $thisdir && pwd`"
-# If we have the realpath program, use it to resolve symlinks.
-# Otherwise, being in a symlinked dir may result in incorrect output.
-if test -x "`which realpath 2>/dev/null`"; then
-  thisdir="`realpath $thisdir`"
-  APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
-fi
 if test -d $bindir; then
   tmpbindir="`cd $bindir && pwd`"
 else
   tmpbindir=""
+fi
+# If we have the realpath program, use it to resolve symlinks
+# Otherwise, being in a symlinked dir may result in incorrect output.
+if test -x "`which realpath 2>/dev/null`"; then
+  thisdir="`realpath $thisdir`"
+  APR_SOURCE_DIR="`realpath $APR_SOURCE_DIR`"
+  if test -d $tmpbindir; then
+    tmpbindir="`realpath $tmpbindir`"
+  fi
 fi
 if test "$tmpbindir" = "$thisdir"; then
   location=installed