Changeset 43375


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...

Location:
trunk/base
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/configure

    r42842 r43375  
    753753CC
    754754SW_VERS
    755 MP_VERSION
    756755MACPORTS_VERSION
    757756target_os
     
    21692168$as_echo "$MACPORTS_VERSION" >&6; }
    21702169
    2171 # Read the old, floating point format version, which we still use internally, and export it for the $macports::autoconf::macports_version variable
    2172 MP_VERSION=$(cat config/mp_version | tr -d '\n')
    2173 
    21742170
    21752171# Check user PATH for MP paths, and remove as necessary.
  • trunk/base/configure.ac

    r42842 r43375  
    1313AC_MSG_RESULT([$MACPORTS_VERSION])
    1414AC_SUBST(MACPORTS_VERSION)
    15 # Read the old, floating point format version, which we still use internally, and export it for the $macports::autoconf::macports_version variable
    16 MP_VERSION=$(cat config/mp_version | tr -d '\n')
    17 AC_SUBST(MP_VERSION)
    1815
    1916# Check user PATH for MP paths, and remove as necessary.
  • trunk/base/portmgr/ReleaseProcess

    r32893 r43375  
    6767
    6868 * Update the file base/ChangeLog in both trunk and the release branch to reflect the appropriate changes.
    69  * Update the file base/config/mp_version with the target release number. Note that this is a floating
    70    point number that corresponds to the release number; it should correspond roughly to the release number
    71    where possible. Release 1.6.1, for instance, would be represented by the floating point number 1.610.
    72    The version number in mp_version is displayed by the port command as the version of MacPorts,
    73    and is used by the selfupdate command to determine whether a newer version of code is available.
    74    This number should be different between trunk and a release branch, the former greater to differentiate
    75    it from the latter.
     69 * Update the file base/config/macports_version with the target release number.  The version number in
     70   macports_version is displayed by the port command as the version of MacPorts, and is used by the selfupdate
     71   command to determine whether a newer version of code is available. This number should be different
     72   between trunk and a release branch, the former greater to differentiate it from the latter.
    7673 * Update the autoconf 'configure' script through the provided base/regen.sh script once the version number
    7774   in mp_version has been changed, since the former reads the latter.
  • 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
  • trunk/base/src/macports1.0/macports_autoconf.tcl.in

    r32167 r43375  
    3434namespace eval macports::autoconf {
    3535    variable macports_conf_path "@MPCONFIGDIR_EXPANDED@"
    36     variable macports_version "@MP_VERSION@"
     36    variable macports_version "@MACPORTS_VERSION@"
    3737    variable macports_user_dir "~/.macports"
    3838    variable svn_path "@SVN@"
Note: See TracChangeset for help on using the changeset viewer.