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

Ryan Schmidt ryandesign at macports.org
Sat Apr 17 19:31:02 PDT 2010


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?





More information about the macports-dev mailing list