Hi I'm trying to get livecheck working for all my ports and am running into a strange problem for bzr-rebase. I have the following in the Portfile: livecheck.check regex livecheck.url ${master_sites} livecheck.regex ${name}-(\[0-9\]+\.\[0-9\]+).tar.gz the specified ${master_sites} points to the download location (http://samba.org/~jelmer/bzr) whenever I run livecheck I get the following displayed [ram@skymoo bzr-rebase]$ sudo port livecheck bzr-rebase seems to have been updated (port version: 0.3, new version: 0.2) [ram@skymoo bzr-rebase]$ Any ideas why livecheck is saying that 0.2 is newer than the ports 0.3, and how I can fix this? Is there a problem with my regular expression? Cheers Adam
Adam Mercer wrote:
Any ideas why livecheck is saying that 0.2 is newer than the ports 0.3, and how I can fix this? Is there a problem with my regular expression?
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 } Most likely, that's a bug and it should use the regular compare. (much like the display functions that weren't sorting correctly) --anders
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 }
Most likely, that's a bug and it should use the regular compare. (much like the display functions that weren't sorting correctly)
That was a bug I already fixed in trunk in r34331. It checked for the first match on the site only, now it extracts all matches and takes the highest version (using rpm-vercomp). Rainer
On Wed, Feb 27, 2008 at 3:19 PM, Rainer Müller <raimue@macports.org> wrote:
That was a bug I already fixed in trunk in r34331.
It checked for the first match on the site only, now it extracts all matches and takes the highest version (using rpm-vercomp).
Thanks, it works as expected using base from trunk. Cheers Adam
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
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
participants (4)
-
Adam Mercer
-
Anders F Björklund
-
Rainer Müller
-
Simon Ruderich