[38067] trunk/dports/lang
Ryan Schmidt
ryandesign at macports.org
Sun Jul 6 12:52:39 PDT 2008
On Jul 6, 2008, at 07:06, Rainer Müller wrote:
> Ryan Schmidt wrote:
>>> + ln -s ${prefix}/bin/perl${version} ${destroot}${prefix}/bin/
>>> $name
>>
>> Wouldn't a relative link have sufficed or is an absolute reference
>> necessary? Just curious.
>>
>> ln -s perl${version} ${destroot}${prefix}/bin/$name
>
> Right, that should have been sufficient as well. But should I
> change it
> now and increment the revision one more time?
>
> There are also other ports using absolute paths for symlinks and I
> don't
> think it is wrong to do so. The ${prefix} is not intended to be
> relocatable. Do you see any problem with absolute symlink paths?
>
> For example from my MacPorts installation:
> $ find /opt/local/bin -type l |wc -l
> 200
> $ find /opt/local/bin -type l |xargs readlink |grep ^/opt/local |wc -l
> 60
In /usr/bin Apple provides some symlinks to other items in /usr/bin,
and on Tiger, 31 of these are relative while 5 are absolute.
$ find /usr/bin -type l |xargs readlink |grep -v / |wc -l
31
$ find /usr/bin -type l |xargs readlink |grep ^/usr/bin |wc -l
5
It seems to me that relative symlinks would be better... For testing
I installed Leopard on a separate partition, and from Leopard, I
wanted to update my MacPorts working copy, but I had already updated
it to Subversion 1.5 format and Leopard only comes with Subversion
1.4.x. I was able to use the Subversion I had installed in Tiger's
MacPorts installation like this:
DYLD_LIBRARY_PATH=/Volumes/tiger/mp/lib:/Volumes/tiger/mp/lib/db46 /
Volumes/tiger/mp/bin/svn up
If svn had been an absolute symlink to /mp/bin/something then this
would not have worked, but a relative symlink would have worked.
Somewhat hypothetical situation, I know, but if I had been trying to
run my Tiger's perl from Leopard I might have run into the problem.
On the other hand, I have one bug report saying that relative
symlinks are bad, though I did not understand why and the reporter
did not clarify:
http://trac.macports.org/ticket/13421
More information about the macports-dev
mailing list