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

raimue at macports.org raimue at macports.org
Mon Mar 3 11:32:55 PST 2008


Revision: 34717
          http://trac.macosforge.org/projects/macports/changeset/34717
Author:   raimue at macports.org
Date:     2008-03-03 11:32:55 -0800 (Mon, 03 Mar 2008)

Log Message:
-----------
port1.0/portlivecheck.tcl:
Fix a bug introduced in r34331, which printed a wrong error message. Closes #14532.

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

Modified: trunk/base/src/port1.0/portlivecheck.tcl
===================================================================
--- trunk/base/src/port1.0/portlivecheck.tcl	2008-03-03 19:17:23 UTC (rev 34716)
+++ trunk/base/src/port1.0/portlivecheck.tcl	2008-03-03 19:32:55 UTC (rev 34717)
@@ -179,25 +179,28 @@
                         } else {
                             set updated 0
                         }
-                        ui_debug "The regex matched \"$matched\""
+                        ui_debug "The regex matched \"$matched\", extracted \"$updated_version\""
                     }
                 } else {
                     set updated_version 0
-                    while {1} {
-                        if {[gets $chan line] < 0} {
-                            break
-                        }
+                    set foundmatch 0
+                    while {[gets $chan line] >= 0} {
                         if {[regexp $the_re $line matched upver]} {
+                            set foundmatch 1
                             if {[rpm-vercomp $upver $updated_version] > 0} {
                                 set updated_version $upver
                             }
-                            ui_debug "The regex matched \"$matched\""
+                            ui_debug "The regex matched \"$matched\", extracted \"$upver\""
                         }
                     }
-                    if {$updated_version != ${livecheck.version}} {
-                        set updated 1
-                    } else {
-                        set updated 0
+                    if {$foundmatch == 1} {
+                        if {$updated_version == 0} {
+                            set updated -1
+                        } elseif {$updated_version != ${livecheck.version}} {
+                            set updated 1
+                        } else {
+                            set updated 0
+                        }
                     }
                 }
                 close $chan

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


More information about the macports-changes mailing list