Changeset 25310


Ignore:
Timestamp:
May 18, 2007, 10:20:10 AM (13 years ago)
Author:
boeyms@…
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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port/port.tcl

    r25283 r25310  
    601601                        }
    602602                       
    603                         # Compare versions, first checking epoch, then the compound version string
     603                        # Compare versions, first checking epoch, then version, then revision
    604604                        set comp_result [expr $installed_epoch - $latest_epoch]
    605605                        if { $comp_result == 0 } {
    606                                 set comp_result [rpm-vercomp $installed_compound $latest_compound]
     606                                set comp_result [rpm-vercomp $installed_version $latest_version]
     607                                if { $comp_result == 0 } {
     608                                        set comp_result [rpm-vercomp $installed_revision $latest_revision]
     609                                }
    607610                        }
    608611                       
     
    16301633                        }
    16311634                       
    1632                         # Compare versions, first checking epoch, then the compound version string
     1635                        # Compare versions, first checking epoch, then version, then revision
    16331636                        set comp_result [expr $installed_epoch - $latest_epoch]
    16341637                        if { $comp_result == 0 } {
    1635                                 set comp_result [rpm-vercomp $installed_compound $latest_compound]
     1638                                set comp_result [rpm-vercomp $installed_version $latest_version]
     1639                                if { $comp_result == 0 } {
     1640                                        set comp_result [rpm-vercomp $installed_revision $latest_revision]
     1641                                }
    16361642                        }
    16371643                       
Note: See TracChangeset for help on using the changeset viewer.