[79011] branches/gsoc11-post-destroot/base/src/port1.0/portpostdestroot.tcl

Felipe Tanus fotanus at gmail.com
Tue May 31 16:08:35 PDT 2011


Hi,

Thank you for point that.  :-)

[]'s

2011/5/30 Ryan Schmidt <ryandesign at macports.org>:
> On May 29, 2011, at 21:58, fotanus at macports.org wrote:
>
>> Revision: 79011
>>          http://trac.macports.org/changeset/79011
>> Author:   fotanus at macports.org
>> Date:     2011-05-29 19:58:38 -0700 (Sun, 29 May 2011)
>> Log Message:
>> -----------
>> Added check for symlinks to post-destroot.
>
>
>> +            if {[regexp $destroot $points_to]} {
>> +                ui_debug "Absolute link path poiting to inside of destroot"
>> +                return -code error "Absolute link path poiting to inside of destroot"
>> +            } else {
>> +                ui_debug "Absolute link path poiting to outside of destroot"
>> +            }
>> +        } elseif { [string compare [file pathtype $points_to] {relative}] == 0 } {
>> +            regsub $destroot$prefix/ $link "" link_without_destroot
>> +            set dir_depth [regexp -all / $link_without_destroot]
>> +            set return_depth [regsub -all {\.\./} $points_to "" points_to_without_returns]
>> +            set return_delta [expr $return_depth - [regexp -all / $points_to_without_returns]]
>> +            if { $return_delta < $dir_depth } {
>> +                ui_debug "Relative link path poiting to inside of destroot"
>> +            } else {
>> +                ui_debug "Relative link path poiting to outside of destroot"
>> +                return -code error "Relative link path poiting to outside of destroot"
>> +            }
>
> I think you mean "pointing".
>
>
>



-- 
Felipe de Oliveira Tanus
E-mail: fotanus at gmail.com
Blog: http://www.itlife.com.br
Site: http://www.inf.ufrgs.br/~fotanus/
-----
"All we have to decide is what to do with the time that is given us." - Gandalf


More information about the macports-dev mailing list