[146642] trunk/base/src/port/portindex.tcl

cal at macports.org cal at macports.org
Mon Mar 14 12:07:43 PDT 2016


Revision: 146642
          https://trac.macports.org/changeset/146642
Author:   cal at macports.org
Date:     2016-03-14 12:07:43 -0700 (Mon, 14 Mar 2016)
Log Message:
-----------
base: portindex: Switch to try -pass_signal

See also: #44814

Modified Paths:
--------------
    trunk/base/src/port/portindex.tcl

Modified: trunk/base/src/port/portindex.tcl
===================================================================
--- trunk/base/src/port/portindex.tcl	2016-03-14 19:06:03 UTC (rev 146641)
+++ trunk/base/src/port/portindex.tcl	2016-03-14 19:07:43 UTC (rev 146642)
@@ -106,7 +106,7 @@
     set portfile [file join $absportdir Portfile]
     # try to reuse the existing entry if it's still valid
     if {$full_reindex != 1 && [info exists qindex($qname)]} {
-        try {
+        try -pass_signal {
             set mtime [file mtime $portfile]
             if {$oldmtime >= $mtime} {
                 lassign [_read_index $qname] name len line
@@ -129,10 +129,6 @@
 
                 return
             }
-        } catch {{POSIX SIG SIGINT} eCode eMessage} {
-            throw
-        } catch {{POSIX SIG SIGTERM} eCode eMessage} {
-            throw
         } catch {{*} eCode eMessage} {
             ui_warn "Failed to open old entry for ${portdir}, making a new one"
             if {[info exists ui_options(ports_debug)]} {
@@ -142,7 +138,7 @@
     }
 
     incr stats(total)
-    try {
+    try -pass_signal {
         _open_port portinfo $portdir $absportdir port_options
         puts "Adding port $portdir"
 
@@ -158,24 +154,16 @@
         }
         foreach sub $portinfo(subports) {
             incr stats(total)
-            try {
+            try -pass_signal {
                 _open_port portinfo $portdir $absportdir port_options $sub
                 puts "Adding subport $sub"
 
                 _write_index_from_portinfo portinfo yes
-            } catch {{POSIX SIG SIGINT} eCode eMessage} {
-                throw
-            } catch {{POSIX SIG SIGTERM} eCode eMessage} {
-                throw
             } catch {{*} eCode eMessage} {
                 puts stderr "Failed to parse file $portdir/Portfile with subport '${sub}': $eMessage"
                 incr stats(failed)
             }
         }
-    } catch {{POSIX SIG SIGINT} eCode eMessage} {
-        throw
-    } catch {{POSIX SIG SIGTERM} eCode eMessage} {
-        throw
     } catch {{*} eCode eMessage} {
         puts stderr "Failed to parse file $portdir/Portfile: $eMessage"
         incr stats(failed)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160314/8c41f62f/attachment.html>


More information about the macports-changes mailing list