[103067] trunk/base/src/package1.0/portarchivefetch.tcl

jmr at macports.org jmr at macports.org
Tue Feb 12 17:07:00 PST 2013


Revision: 103067
          https://trac.macports.org/changeset/103067
Author:   jmr at macports.org
Date:     2013-02-12 17:07:00 -0800 (Tue, 12 Feb 2013)
Log Message:
-----------
don't treat an invalid archive signature as a fatal error if we can fall back to building from source

Modified Paths:
--------------
    trunk/base/src/package1.0/portarchivefetch.tcl

Modified: trunk/base/src/package1.0/portarchivefetch.tcl
===================================================================
--- trunk/base/src/package1.0/portarchivefetch.tcl	2013-02-13 01:00:32 UTC (rev 103066)
+++ trunk/base/src/package1.0/portarchivefetch.tcl	2013-02-13 01:07:00 UTC (rev 103067)
@@ -253,14 +253,16 @@
                         ui_debug "openssl output: $result"
                     }
                 }
+                file delete -force $signature
                 if {!$verified} {
-                    return -code error "Failed to verify signature for archive!"
-                }
-                if {[catch {file rename -force "${incoming_path}/${archive}.TMP" "${archivefetch.fulldestpath}/${archive}"} result]} {
+                    # fall back to building from source (or error out later if binary only mode)
+                    ui_warn "Failed to verify signature for archive!"
+                    file delete -force "${incoming_path}/${archive}.TMP"
+                    break
+                } elseif {[catch {file rename -force "${incoming_path}/${archive}.TMP" "${archivefetch.fulldestpath}/${archive}"} result]} {
                     ui_debug "$::errorInfo"
                     return -code error "Failed to move downloaded archive into place: $result"
                 }
-                file delete -force $signature
                 set archive_exists 1
                 break
             }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130212/ac8b4ff3/attachment.html>


More information about the macports-changes mailing list