Ignore:
Timestamp:
Dec 10, 2008, 4:49:53 AM (12 years ago)
Author:
jmpp@…
Message:

Finally move trunk away from floating point version numbers and instead use the more common x.y.z format, by:

  • Moving base/macports1.0/macports_autoconf.tcl.in to the @MACPORTS_VERSION@ autoconf variable;
  • Introducing a temporary special-case hack to force the selfupdate run in case the $macports::autoconf::macports_version variable is in the old format and smaller or equal to 1.800 (cf. my comment in the selfupdate proc in base/macports1.0/macports.tcl);
  • Removing the now unnecessary base/config/mp_version file, as everything is now determined from the base/config/macports_version file;
  • Removing the @MP_VERSION@ autoconf macro;
  • Regenerating the configure script;

All in all, we should have standard x.y.z version numbers starting from current trunk + 1 (e.g. 1.8.1), since
current trunk will only serve to introduce this code into users' hands first.

PS: I chose to force the upgrade as the special-case hack, since otherwise I'd have to reset the $macports::autoconf::macports_version
variable to achieve the same result, and that seems like it might make some babies out there cry...

File:
1 edited

Legend:

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

    r43263 r43375  
    18671867
    18681868    # Choose what version file to use: old, floating point format or new, real version number format
    1869     set old_version_file [file join $mp_source_path config mp_version]
    1870     set new_version_file [file join $mp_source_path config macports_version]
    1871     if {[file exists $old_version_file]} {
    1872         set fd [open $old_version_file r]
    1873     } elseif {[file exists $new_version_file]} {
    1874         set fd [open $new_version_file r]
    1875     }
    1876     # get downloaded MacPorts version
    1877     gets $fd macports_version_new
    1878     close $fd
    1879     # echo downloaded MacPorts version
    1880     ui_msg "Downloaded MacPorts base version $macports_version_new"
     1869    set version_file [file join $mp_source_path config macports_version]
     1870    if {[file exists $version_file]} {
     1871        set fd [open $version_file r]
     1872        gets $fd macports_version_new
     1873        close $fd
     1874        # echo downloaded MacPorts version
     1875        ui_msg "Downloaded MacPorts base version $macports_version_new"
     1876    } else {
     1877        ui_warn "No version file found, please rerun selfupdate."
     1878        set macports_version_new 0
     1879    }
     1880
     1881    # Temporary special-case hack to move MacPorts away from floating point version numbers:
     1882    # If we encounter a floating point version number smaller or equal to 1.800, we force the
     1883    # upgrade, since the 8 in 1.8.x will always be smaller than, e.g. the 700 in 1.700, the 610
     1884    # in 1.610, etc, and therefore the upgrade would never trigger on its own.
     1885    if {$macports::autoconf::macports_version <= 1.800} {
     1886        set use_the_force_luke yes
     1887    }
    18811888
    18821889    # check if we we need to rebuild base
Note: See TracChangeset for help on using the changeset viewer.