[66600] trunk/base/src/macports1.0/macports_fastload.tcl.in

Joshua Root jmr at macports.org
Sun Apr 18 02:22:58 PDT 2010


On 2010-4-18 12:31 , Ryan Schmidt wrote:
> 
> On Apr 17, 2010, at 21:10, raimue at macports.org wrote:
> 
>> Avoid catch which masks any error, instead test if the file actually exists
> 
> I was gonna ask about this, with regard to the python portgroups. Shouldn't we be doing this:
> 
> 
> 
> $ svn di python26-1.0.tcl 
> Index: python26-1.0.tcl
> ===================================================================
> --- python26-1.0.tcl	(revision 66541)
> +++ python26-1.0.tcl	(working copy)
> @@ -64,7 +64,7 @@
>  post-destroot {
>      if {${python.link_binaries}} {
>          foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
> -            if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
> +            if {![file exists "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"]} {
>                  ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
>              }
>          }
> 
> 
> 
> Or is the catch doing something more?

'file exists' follows symlinks.

- Josh


More information about the macports-dev mailing list