[127212] trunk/dports/_resources/port1.0/livecheck/master-sites.tcl

khindenburg at macports.org khindenburg at macports.org
Wed Oct 22 21:02:43 PDT 2014


Revision: 127212
          https://trac.macports.org/changeset/127212
Author:   khindenburg at macports.org
Date:     2014-10-22 21:02:43 -0700 (Wed, 22 Oct 2014)
Log Message:
-----------
livecheck: set type to "none" when $master_sites is not set or empty #45572

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/livecheck/master-sites.tcl

Modified: trunk/dports/_resources/port1.0/livecheck/master-sites.tcl
===================================================================
--- trunk/dports/_resources/port1.0/livecheck/master-sites.tcl	2014-10-23 00:26:14 UTC (rev 127211)
+++ trunk/dports/_resources/port1.0/livecheck/master-sites.tcl	2014-10-23 04:02:43 UTC (rev 127212)
@@ -2,6 +2,8 @@
 #
 # This file contains the livecheck defaults for using port's master_sites.
 
+set livecheck.type "regex"
+
 if {${livecheck.name} eq "default"} {
     set livecheck.name ${name}
 }
@@ -9,9 +11,12 @@
     set livecheck.distname ${livecheck.name}
 }
 if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
-    set livecheck.url [lindex ${master_sites} 0]
+    if {![info exists master_sites] || [llength ${master_sites}] == 0} {
+        set livecheck.type "none"
+    } else {
+        set livecheck.url [lindex ${master_sites} 0]
+    }
 }
 if {${livecheck.regex} eq ""} {
     set livecheck.regex [list "[quotemeta ${livecheck.distname}]-(\\d+(?:\\.\\d+)*)"]
 }
-set livecheck.type "regex"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141022/dc4cc225/attachment.html>


More information about the macports-changes mailing list