[25310] trunk/base/src/port/port.tcl

source_changes at macosforge.org source_changes at macosforge.org
Fri May 18 03:20:11 PDT 2007


Revision: 25310
          http://trac.macosforge.org/projects/macports/changeset/25310
Author:   boeyms at macports.org
Date:     2007-05-18 03:20:10 -0700 (Fri, 18 May 2007)

Log Message:
-----------
 * Make a correction to port(1)'s determination of whether or not a port has
   been updated by making it compare ${version} and then ${revision} rather than
   a single comparison of the compound ${version}_${revision}; the latter
   reports 2.01_2 to be newer than 2.01.01a25_0 because, at the fifth character,
   `_' comes after `.' in ASCII lexicographic order.

Modified Paths:
--------------
    trunk/base/src/port/port.tcl

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2007-05-18 08:55:56 UTC (rev 25309)
+++ trunk/base/src/port/port.tcl	2007-05-18 10:20:10 UTC (rev 25310)
@@ -600,10 +600,13 @@
 				set latest_epoch	$portinfo(epoch)
 			}
 			
-			# Compare versions, first checking epoch, then the compound version string
+			# Compare versions, first checking epoch, then version, then revision
 			set comp_result [expr $installed_epoch - $latest_epoch]
 			if { $comp_result == 0 } {
-				set comp_result [rpm-vercomp $installed_compound $latest_compound]
+				set comp_result [rpm-vercomp $installed_version $latest_version]
+				if { $comp_result == 0 } {
+					set comp_result [rpm-vercomp $installed_revision $latest_revision]
+				}
 			}
 			
 			# Add outdated ports to our results list
@@ -1629,10 +1632,13 @@
 				set latest_epoch	$portinfo(epoch)
 			}
 			
-			# Compare versions, first checking epoch, then the compound version string
+			# Compare versions, first checking epoch, then version, then revision
 			set comp_result [expr $installed_epoch - $latest_epoch]
 			if { $comp_result == 0 } {
-				set comp_result [rpm-vercomp $installed_compound $latest_compound]
+				set comp_result [rpm-vercomp $installed_version $latest_version]
+				if { $comp_result == 0 } {
+					set comp_result [rpm-vercomp $installed_revision $latest_revision]
+				}
 			}
 			
 			# Report outdated (or, for verbose, predated) versions

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


More information about the macports-changes mailing list