Revision
68289
Author
jmr@macports.org
Date
2010-05-30 22:13:44 -0700 (Sun, 30 May 2010)

Log Message

merge r68286, r68288 from trunk:
 fix version comparison in action_outdated when epoch has changed
 only print reason message when epochs differ in action_outdated if the comparison result would otherwise be unexpected

Modified Paths

Diff

Modified: branches/release_1_9/base/src/port/port.tcl (68288 => 68289)


--- branches/release_1_9/base/src/port/port.tcl	2010-05-31 05:11:31 UTC (rev 68288)
+++ branches/release_1_9/base/src/port/port.tcl	2010-05-31 05:13:44 UTC (rev 68289)
@@ -2987,10 +2987,12 @@
                 set comp_result [rpm-vercomp $installed_revision $latest_revision]
             }
             set reason ""
-            if {$comp_result == 0 && $epoch_comp_result != 0} {
-                set reason { (epoch $installed_epoch $relation $latest_epoch)}
+            if {$epoch_comp_result != 0} {
+                if {($comp_result >= 0 && $epoch_comp_result < 0) || ($comp_result <= 0 && $epoch_comp_result > 0)} {
+                    set reason { (epoch $installed_epoch $relation $latest_epoch)}
+                }
                 set comp_result $epoch_comp_result
-            } elseif {$comp_result == 0 && $epoch_comp_result == 0} {
+            } elseif {$comp_result == 0} {
                 set regref [registry::open_entry $portname $installed_version $installed_revision [lindex $i 3] $installed_epoch]
                 set os_platform_installed [registry::property_retrieve $regref os_platform]
                 set os_major_installed [registry::property_retrieve $regref os_major]