[48265] trunk/base/src/port1.0/portlivecheck.tcl
David Evans
devans at macports.org
Wed Mar 18 10:18:43 PDT 2009
Perry Lee wrote:
> Index: src/port1.0/portlivecheck.tcl
> ===================================================================
> --- src/port1.0/portlivecheck.tcl (revision 48265)
> +++ src/port1.0/portlivecheck.tcl (working copy)
> @@ -199,7 +199,7 @@
> set updated_version 0
> set foundmatch 0
> while {[gets $chan line] >= 0} {
> - if {[regexp $the_re $line matched upver]} {
> + if {[regexp -nocase $the_re $line matched
> upver]} {
> set foundmatch 1
> if {$updated_version == 0 || [rpm-vercomp
> $upver $updated_version] > 0} {
> set updated_version $upver
>
> With the above change, livecheck works with the examples you've listed
> (i.e., you don't need to change their livecheck.names). Are there any
> negative repercussions for ignoring case in livecheck, though?
>
After looking at the code, I understand your caution since this change
applies to all livecheck regex's not just the freshmeat ones.
So I did a more extensive test with this patch in place. I did
livechecks on a list of ports consisting of all my maintained ports
and their dependencies (287 ports total). This includes port using many
different regex styles not just freshmeat.
The only failures were the following 8 (my comments on the reasons for
failure appended) :
Error: cannot check if libgsf was updated (regex didn't match) //
freshmeat: string to match is "GNOME Structured File Library"
Error: cannot check if libsamplerate was updated (regex didn't match)
// freshmeat: string to match is "Secret Rabbit Code"
Error: cannot check if libusb was updated (regex didn't match) //
sourceforge: string to match is "libusb-1.0 libusb-"
Error: cannot check if mesa was updated (regex didn't match) //
sourceforge: port uses livecheck.name mesa3d, needs to match "Mesa Lib"
Error: cannot check if sane-backends was updated (HTTP response code
said error) // freshmeat: project not in freshmeat, returns error page.
Error: cannot check if tcl was updated (regex didn't match) //
freshmeat: port uses livecheck.name tcltk, string to match is "Tcl/Tk"
Error: cannot check if tk was updated (regex didn't match) // freshmeat:
port uses livecheck.name tcltk, string to match is "Tcl/Tk"
Error: cannot check if webkit-gtk was updated (HTTP response code said
error) // freshmeat: project not in freshmeat, returns error page.
These would fail in any case and probably did before the freshmeat
change as well,
so I don't see any adverse effects from -nocase in this fairly large same.
Can send you my test list if you like.
I vote to include this additional patch as part of 1.7.1 to keep the
freshmeat livechecks working as they did before the recent changes.
More information about the macports-dev
mailing list