<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/6718cc6248373752d3172a1ed6412d883d6a96e4">https://github.com/macports/macports-base/commit/6718cc6248373752d3172a1ed6412d883d6a96e4</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'>     new 6718cc6  Check for file size sanity in _archive_available
</span>6718cc6 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 6718cc6248373752d3172a1ed6412d883d6a96e4
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Feb 14 23:45:19 2017 +1100

<span style='display:block; white-space:pre;color:#404040;'>    Check for file size sanity in _archive_available
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    It seems that if 'curl getsize' is called with an FTP URL that points
</span><span style='display:block; white-space:pre;color:#404040;'>    to a nonexistent file, it will return a size of -1 rather than throw
</span><span style='display:block; white-space:pre;color:#404040;'>    an error like it does with HTTP.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Fixes: https://trac.macports.org/ticket/53530
</span>---
 src/port1.0/portutil.tcl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portutil.tcl b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index b5cf00b..a1d09ea 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3296,7 +3296,9 @@ proc _archive_available {} {
</span>         append site [option archive.subdir]
     }
     set url [portfetch::assemble_url $site $archivename]
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    if {![catch {curl getsize $url} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # curl getsize can return -1 instead of throwing an error for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # nonexistent files on FTP sites.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {![catch {curl getsize $url} size] && $size > 0} {
</span>         set archive_available_result 1
         return 1
     }
</pre><pre style='margin:0'>

</pre>