[email protected] wrote:

Revision
    48265 <http://trac.macports.org/changeset/48265>
Author
    [email protected]
Date
    2009-03-17 16:32:31 -0700 (Tue, 17 Mar 2009)


      Log Message

port1.0/portlivecheck.tcl - Fixed livecheck for freshmeat. (Addresses #18887)


      Modified Paths

    * trunk/base/src/port1.0/portlivecheck.tcl
      <#trunkbasesrcport10portlivechecktcl>


      Diff


        Modified: trunk/base/src/port1.0/portlivecheck.tcl (48264 =>
        48265)


--- trunk/base/src/port1.0/portlivecheck.tcl    2009-03-17 22:52:16 UTC (rev 
48264)
+++ trunk/base/src/port1.0/portlivecheck.tcl    2009-03-17 23:32:31 UTC (rev 
48265)
@@ -123,10 +123,10 @@
     switch ${livecheck.check} {
         "freshmeat" {
             if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
-                set livecheck.url 
"http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml";
+                set livecheck.url 
"http://freshmeat.net/projects/${livecheck.name}/releases.atom";
             }
             if {${livecheck.regex} eq ""} {
-                set livecheck.regex [list 
"<latest_release_version>(.*)</latest_release_version>"]
+                set livecheck.regex [list "<title>${livecheck.name} 
(.*)</title>"]
             }
             set livecheck.check "regex"
         }
This certainly fixes the URL and the majority of cases but there are some that fail because the regex doesn't match due to differences in case (in various combinations) between our port name and the name used in the rss entry.

It appears that their page will accept and match to the correct project any casing of the livecheck.name in the URL. If the regex would
do the same then most of the rest would be solved.

Examples

livecheck.name gimp or GIMP selects the right but the regex needs to match GIMP livecheck.name XviD, xvid, Xvid selects the right project but the regex needs to match Xvid livecheck.name xsane select the right project but the regex needs to match XSane

Hopefully you can see what I mean -- I'm not describing it well. So if one could construct a regex that would match the livecheck.name in any case combination that would be good. I just
don't know how to do that off the top of my head.

Dave
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to