On Thu, Feb 28, 2008 at 04:31:56AM +0100, Rainer Müller wrote:
Anders F Björklund wrote:
That's probably because livecheck doesn't check to see if the new version is actually *newer*, it only checks if it changed...
if {$updated_version != ${livecheck.version}} { set updated 1 } else { set updated 0 }
We could also use rpm-vercomp here, but you would never notice if the site being checked is not updated anymore (happens e.g. with freshmeat). So if the port version is newer than the version livecheck finds, we should at least issue a warning that livecheck needs to be tweaked.
Rainer
Hi, I found another small problem with the livecheck. I have a port in my local repository which uses ${name}-${version} as livecheck.version. With the current version it gives me the following. First it says it matched and then it doesn't. DEBUG: The regex matched "<title>fdm fdm-1.5 released (Tue, 04 Mar 2008 08:33:08 GMT)</title>", extracted "fdm-1.5" DEBUG: The regex matched "<title>fdm fdm-1.4 released (Mon, 01 Oct 2007 12:45:11 GMT)</title>", extracted "fdm-1.4" DEBUG: The regex matched "<title>fdm fdm-1.3 released (Mon, 30 Jul 2007 17:38:15 GMT)</title>", extracted "fdm-1.3" DEBUG: The regex matched "<title>fdm fdm-1.2 released (Wed, 27 Jun 2007 08:16:56 GMT)</title>", extracted "fdm-1.2" DEBUG: The regex matched "<title>fdm fdm-1.1 released (Fri, 06 Apr 2007 13:40:32 GMT)</title>", extracted "fdm-1.1" DEBUG: The regex matched "<title>fdm fdm-1.0 released (Tue, 27 Feb 2007 23:45:33 GMT)</title>", extracted "fdm-1.0" DEBUG: The regex matched "<title>fdm fdm-0.9 released (Thu, 25 Jan 2007 16:49:31 GMT)</title>", extracted "fdm-0.9" DEBUG: The regex matched "<title>fdm fdm-0.8 released (Tue, 09 Jan 2007 16:53:07 GMT)</title>", extracted "fdm-0.8" DEBUG: The regex matched "<title>fdm fdm-0.7 released (Tue, 12 Dec 2006 17:59:35 GMT)</title>", extracted "fdm-0.7" DEBUG: The regex matched "<title>fdm fdm-0.6 released (Mon, 04 Dec 2006 14:11:36 GMT)</title>", extracted "fdm-0.6" Error: cannot check if fdm was updated (regex didn't match) I looked into this and the problem is that [rpm-vercomp $upver $updated_version] returns -1 if $updated_version is 0 and $upver is something like fdm-1.5 which is true before any version is found. It works fine for $upvar 1.5. The following patch fixes the problem for me but I'm not sure if it causes any other problems. Please check if it works fine. --- src/port1.0/portlivecheck.tcl (revision 34864) +++ src/port1.0/portlivecheck.tcl (working copy) @@ -187,7 +187,7 @@ while {[gets $chan line] >= 0} { if {[regexp $the_re $line matched upver]} { set foundmatch 1 - if {[rpm-vercomp $upver $updated_version] > 0} { + if {[rpm-vercomp $upver $updated_version] > 0 || $updated_version == 0} { set updated_version $upver } ui_debug "The regex matched \"$matched\", extracted \"$upver\"" Thanks, Simon -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229