[146637] trunk/base/src/port1.0

cal at macports.org cal at macports.org
Mon Mar 14 09:55:15 PDT 2016


Revision: 146637
          https://trac.macports.org/changeset/146637
Author:   cal at macports.org
Date:     2016-03-14 09:55:15 -0700 (Mon, 14 Mar 2016)
Log Message:
-----------
port1.0: Adapt to try -pass_signal from r146633

Revision Links:
--------------
    https://trac.macports.org/changeset/146633

Modified Paths:
--------------
    trunk/base/src/port1.0/portclean.tcl
    trunk/base/src/port1.0/portdistcheck.tcl
    trunk/base/src/port1.0/portfetch.tcl

Modified: trunk/base/src/port1.0/portclean.tcl
===================================================================
--- trunk/base/src/port1.0/portclean.tcl	2016-03-14 16:50:26 UTC (rev 146636)
+++ trunk/base/src/port1.0/portclean.tcl	2016-03-14 16:55:15 UTC (rev 146637)
@@ -214,14 +214,8 @@
 
     if {[file isdirectory $subbuildpath]} {
         ui_debug "Removing directory: ${subbuildpath}"
-        try {
+        try -pass_signal {
             delete $subbuildpath
-        } catch {{POSIX SIG SIGINT} eCode eMessage} {
-            ui_debug [msgcat::mc "Aborted due to SIGINT"]
-            throw
-        } catch {{POSIX SIG SINTERM} eCode eMessage} {
-            ui_debug [msgcat::mc "Aborted due to SIGTERM"]
-            throw
         } catch {{*} eCode eMessage} {
             ui_debug "$::errorInfo"
             ui_error "$eMessage"
@@ -234,14 +228,8 @@
 
     if {!$usealtworkpath && [file isdirectory ${altprefix}${subbuildpath}]} {
         ui_debug "Removing directory: ${altprefix}${subbuildpath}"
-        try {
+        try -pass_signal {
             delete ${altprefix}${subbuildpath}
-        } catch {{POSIX SIG SIGINT} eCode eMessage} {
-            ui_debug [msgcat::mc "Aborted due to SIGINT"]
-            throw
-        } catch {{POSIX SIG SINTERM} eCode eMessage} {
-            ui_debug [msgcat::mc "Aborted due to SIGTERM"]
-            throw
         } catch {{*} eCode eMessage} {
             ui_debug "$::errorInfo"
             ui_error "$eMessage"

Modified: trunk/base/src/port1.0/portdistcheck.tcl
===================================================================
--- trunk/base/src/port1.0/portdistcheck.tcl	2016-03-14 16:50:26 UTC (rev 146636)
+++ trunk/base/src/port1.0/portdistcheck.tcl	2016-03-14 16:55:15 UTC (rev 146637)
@@ -85,18 +85,12 @@
                 foreach site $urlmap($url_var) {
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
-                    try {
+                    try -pass_signal {
                         set urlnewer [curl isnewer {*}$curl_options $file_url $port_moddate]
                         if {$urlnewer} {
                             ui_warn "port $subport: $file_url is newer than Portfile"
                         }
                         incr count
-                    } catch {{POSIX SIG SIGINT} eCode eMessage} {
-                        ui_debug [msgcat::mc "Aborted due to SIGINT"]
-                        throw
-                    } catch {{POSIX SIG SIGTERM} eCode eMessage} {
-                        ui_debug [msgcat::mc "Aborted due to SIGTERM"]
-                        throw
                     } catch {{*} eCode eMessage} {
                         ui_debug [msgcat::mc "couldn't fetch %s for %s (%s)" $file_url $subport $eMessage]
                     }
@@ -109,7 +103,7 @@
                 foreach site $urlmap($url_var) {
                     ui_debug [format [msgcat::mc "Checking %s from %s"] $distfile $site]
                     set file_url [portfetch::assemble_url $site $distfile]
-                    try {
+                    try -pass_signal {
                         set urlsize [curl getsize {*}$curl_options $file_url]
                         incr count
                         if {$urlsize > 0} {
@@ -117,12 +111,6 @@
                             incr totalsize $urlsize
                             break
                         }
-                    } catch {{POSIX SIG SIGINT} eCode eMessage} {
-                        ui_debug [msgcat::mc "Aborted due to SIGINT"]
-                        throw
-                    } catch {{POSIX SIG SIGTERM} eCode eMessage} {
-                        ui_debug [msgcat::mc "Aborted due to SIGTERM"]
-                        throw
                     } catch {{*} eCode eMessage} {
                         ui_debug [msgcat::mc "couldn't fetch %s for %s (%s)" $file_url $subport $eMessage]
                     }

Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl	2016-03-14 16:50:26 UTC (rev 146636)
+++ trunk/base/src/port1.0/portfetch.tcl	2016-03-14 16:55:15 UTC (rev 146637)
@@ -539,22 +539,16 @@
             foreach site $urlmap($url_var) {
                 ui_notice "$UI_PREFIX [format [msgcat::mc "Attempting to fetch %s from %s"] $distfile $site]"
                 set file_url [portfetch::assemble_url $site $distfile]
-                try {
+                try -pass_signal {
                     curl fetch {*}$fetch_options $file_url "${distpath}/${distfile}.TMP"
                     file rename -force "${distpath}/${distfile}.TMP" "${distpath}/${distfile}"
                     set fetched 1
                     break
-                } catch {{POSIX SIG SIGINT} eCode eMessage} {
-                    ui_debug [msgcat::mc "Aborted fetching distfile due to SIGINT"]
-                    file delete -force "${distpath}/${distfile}.TMP"
-                    throw
-                } catch {{POSIX SIG SIGTERM} eCode eMessage} {
-                    ui_debug [msgcat::mc "Aborted fetching distfile due to SIGTERM"]
-                    file delete -force "${distpath}/${distfile}.TMP"
-                    throw
                 } catch {{*} eCode eMessage} {
                     ui_debug [msgcat::mc "Fetching distfile failed: %s" $eMessage]
                     set lastError $eMessage
+                } finally {
+                    file delete -force "${distpath}/${distfile}.TMP"
                 }
             }
             if {![info exists fetched]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160314/7d20994f/attachment.html>


More information about the macports-changes mailing list