[24319] trunk/base/src/port1.0/portlivecheck.tcl

source_changes at macosforge.org source_changes at macosforge.org
Sat Apr 21 08:01:49 PDT 2007


Revision: 24319
          http://trac.macosforge.org/projects/macports/changeset/24319
Author:   pguyot at kallisys.net
Date:     2007-04-21 08:01:49 -0700 (Sat, 21 Apr 2007)

Log Message:
-----------
Fixed a bug where the automatic detection of googlecode livecheck did not verify that the port had a homepage. (this was reported as #11818)

Modified Paths:
--------------
    trunk/base/src/port1.0/portlivecheck.tcl

Modified: trunk/base/src/port1.0/portlivecheck.tcl
===================================================================
--- trunk/base/src/port1.0/portlivecheck.tcl	2007-04-21 14:45:39 UTC (rev 24318)
+++ trunk/base/src/port1.0/portlivecheck.tcl	2007-04-21 15:01:49 UTC (rev 24319)
@@ -62,6 +62,7 @@
 	set updated 0
 	set updated_version "unknown"
 	set has_master_sites [info exists master_sites]
+	set has_homepage [info exists homepage]
 
 	set tempfile ${workpath}/livecheck.TMP
 	set port_moddate [file mtime ${portpath}/Portfile]
@@ -79,7 +80,7 @@
 		} else {
 		    set livecheck.check "freshmeat"
 		}
-		if {[regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]} {
+		if {$has_homepage && [regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]} {
 		    if {${livecheck.name} eq "default"} {
 		        set livecheck.name $tag
 		    }
@@ -93,7 +94,7 @@
 	# Perform the check depending on the type.
 	switch ${livecheck.check} {
 	    "freshmeat" {
-    		if {![info exists homepage] || ${livecheck.url} eq ${homepage}} {
+    		if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
     			set livecheck.url "http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml"
     		}
     		if {${livecheck.regex} eq ""} {
@@ -102,7 +103,7 @@
     		set livecheck.check "regex"
 		}
 		"sourceforge" {
-    		if {![info exists homepage] || ${livecheck.url} eq ${homepage}} {
+    		if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
     			set livecheck.url "http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}"
     		}
     		if {${livecheck.distname} eq "default"} {
@@ -114,7 +115,7 @@
     		set livecheck.check "regex"
 		}
 		"googlecode" {
-		    if {![info exists homepage] || ${livecheck.url} eq ${homepage}} {
+		    if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
 		        set livecheck.url "http://code.google.com/p/${livecheck.name}/downloads/list"
 		    }
 		    if {${livecheck.distname} eq "default"} {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070421/203f1b72/attachment.html


More information about the macports-changes mailing list