Re: [38067] trunk/dports/lang

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [38067] trunk/dports/lang

by Ryan Schmidt-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jul 5, 2008, at 08:24, raimue@... wrote:

> Revision: 38067
>           http://trac.macosforge.org/projects/macports/changeset/38067
> Author:   raimue@...
> Date:     2008-07-05 06:24:00 -0700 (Sat, 05 Jul 2008)
> Log Message:
> -----------
> lang/perl5.8, lang/perl5.10:
> Add a perl binary with major version, bin/perl5.8 and bin/perl5.10
>
> Modified Paths:
> --------------
>     trunk/dports/lang/perl5.10/Portfile
>     trunk/dports/lang/perl5.8/Portfile


> +    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


_______________________________________________
macports-dev mailing list
macports-dev@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Re: [38067] trunk/dports/lang

by Rainer Müller-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Rainer
_______________________________________________
macports-dev mailing list
macports-dev@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Re: [38067] trunk/dports/lang

by Ryan Schmidt-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


_______________________________________________
macports-dev mailing list
macports-dev@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
LightInTheBox - Buy quality products at wholesale price!