Changeset 74725


Ignore:
Timestamp:
Dec 30, 2010, 10:25:22 PM (8 years ago)
Author:
jmr@…
Message:

when determining if a port is outdated, only consider epoch if the version has changed

Location:
trunk/base/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r73544 r74725  
    30323032        set revision [lindex $i 2]
    30333033        set epoch [lindex $i 5]
    3034         if { $version_installed == {} || $epoch > $epoch_installed ||
    3035                 ($epoch == $epoch_installed && [rpm-vercomp $version $version_installed] > 0)
    3036                 || ($epoch == $epoch_installed
     3034        if { $version_installed == {} || ($epoch > $epoch_installed && $version != $version_installed) ||
     3035                ($epoch >= $epoch_installed && [rpm-vercomp $version $version_installed] > 0)
     3036                || ($epoch >= $epoch_installed
    30373037                    && [rpm-vercomp $version $version_installed] == 0
    30383038                    && $revision > $revision_installed)} {
  • trunk/base/src/port/port.tcl

    r74655 r74725  
    774774
    775775            # Compare versions, first checking epoch, then version, then revision
    776             set comp_result [expr $installed_epoch - $latest_epoch]
     776            set comp_result 0
     777            if {$installed_version != $latest_version} {
     778                set comp_result [expr $installed_epoch - $latest_epoch]
     779                if { $comp_result == 0 } {
     780                    set comp_result [rpm-vercomp $installed_version $latest_version]
     781                }
     782            }
    777783            if { $comp_result == 0 } {
    778                 set comp_result [rpm-vercomp $installed_version $latest_version]
    779                 if { $comp_result == 0 } {
    780                     set comp_result [rpm-vercomp $installed_revision $latest_revision]
    781                 }
     784                set comp_result [expr $installed_revision - $latest_revision]
    782785            }
    783786            if {$comp_result == 0} {
     
    30113014            set comp_result [rpm-vercomp $installed_version $latest_version]
    30123015            if { $comp_result == 0 } {
    3013                 set comp_result [rpm-vercomp $installed_revision $latest_revision]
     3016                set comp_result [expr $installed_revision - $latest_revision]
    30143017            }
    30153018            set reason ""
    3016             if {$epoch_comp_result != 0} {
     3019            if {$epoch_comp_result != 0 && $installed_version != $latest_version} {
    30173020                if {($comp_result >= 0 && $epoch_comp_result < 0) || ($comp_result <= 0 && $epoch_comp_result > 0)} {
    30183021                    set reason { (epoch $installed_epoch $relation $latest_epoch)}
Note: See TracChangeset for help on using the changeset viewer.