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

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@43375 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
Juan Manuel Palacios
2008-12-10 04:49:53 +00:00
parent 27f36f0821
commit 514b7ee3a0
6 changed files with 23 additions and 27 deletions
-1
View File
@@ -1 +0,0 @@
1.800
Vendored
-4
View File
@@ -752,7 +752,6 @@ LDFLAGS
CFLAGS
CC
SW_VERS
MP_VERSION
MACPORTS_VERSION
target_os
target_vendor
@@ -2168,9 +2167,6 @@ MACPORTS_VERSION=1.8.0
{ $as_echo "$as_me:$LINENO: result: $MACPORTS_VERSION" >&5
$as_echo "$MACPORTS_VERSION" >&6; }
# Read the old, floating point format version, which we still use internally, and export it for the $macports::autoconf::macports_version variable
MP_VERSION=$(cat config/mp_version | tr -d '\n')
# Check user PATH for MP paths, and remove as necessary.
-3
View File
@@ -12,9 +12,6 @@ AC_MSG_CHECKING(MacPorts version)
MACPORTS_VERSION=MACPORTS_VERSION_MACRO
AC_MSG_RESULT([$MACPORTS_VERSION])
AC_SUBST(MACPORTS_VERSION)
# Read the old, floating point format version, which we still use internally, and export it for the $macports::autoconf::macports_version variable
MP_VERSION=$(cat config/mp_version | tr -d '\n')
AC_SUBST(MP_VERSION)
# Check user PATH for MP paths, and remove as necessary.
MP_PATH_SCAN
+4 -7
View File
@@ -66,13 +66,10 @@ the branch you intend to manage:
In preparation for a release, several things should be completed within the code:
* Update the file base/ChangeLog in both trunk and the release branch to reflect the appropriate changes.
* Update the file base/config/mp_version with the target release number. Note that this is a floating
point number that corresponds to the release number; it should correspond roughly to the release number
where possible. Release 1.6.1, for instance, would be represented by the floating point number 1.610.
The version number in mp_version is displayed by the port command as the version of MacPorts,
and is used by the selfupdate command to determine whether a newer version of code is available.
This number should be different between trunk and a release branch, the former greater to differentiate
it from the latter.
* Update the file base/config/macports_version with the target release number. The version number in
macports_version is displayed by the port command as the version of MacPorts, and is used by the selfupdate
command to determine whether a newer version of code is available. This number should be different
between trunk and a release branch, the former greater to differentiate it from the latter.
* Update the autoconf 'configure' script through the provided base/regen.sh script once the version number
in mp_version has been changed, since the former reads the latter.
* Make sure that these and any other changes or bug fixes are made on and/or merged between the release branch
+18 -11
View File
@@ -1866,18 +1866,25 @@ proc macports::selfupdate {{optionslist {}}} {
}
# Choose what version file to use: old, floating point format or new, real version number format
set old_version_file [file join $mp_source_path config mp_version]
set new_version_file [file join $mp_source_path config macports_version]
if {[file exists $old_version_file]} {
set fd [open $old_version_file r]
} elseif {[file exists $new_version_file]} {
set fd [open $new_version_file r]
set version_file [file join $mp_source_path config macports_version]
if {[file exists $version_file]} {
set fd [open $version_file r]
gets $fd macports_version_new
close $fd
# echo downloaded MacPorts version
ui_msg "Downloaded MacPorts base version $macports_version_new"
} else {
ui_warn "No version file found, please rerun selfupdate."
set macports_version_new 0
}
# Temporary special-case hack to move MacPorts away from floating point version numbers:
# If we encounter a floating point version number smaller or equal to 1.800, we force the
# upgrade, since the 8 in 1.8.x will always be smaller than, e.g. the 700 in 1.700, the 610
# in 1.610, etc, and therefore the upgrade would never trigger on its own.
if {$macports::autoconf::macports_version <= 1.800} {
set use_the_force_luke yes
}
# get downloaded MacPorts version
gets $fd macports_version_new
close $fd
# echo downloaded MacPorts version
ui_msg "Downloaded MacPorts base version $macports_version_new"
# check if we we need to rebuild base
if {$use_the_force_luke == "yes" || [rpm-vercomp $macports_version_new $macports::autoconf::macports_version] > 0} {
+1 -1
View File
@@ -33,7 +33,7 @@ package provide macports 1.0
namespace eval macports::autoconf {
variable macports_conf_path "@MPCONFIGDIR_EXPANDED@"
variable macports_version "@MP_VERSION@"
variable macports_version "@MACPORTS_VERSION@"
variable macports_user_dir "~/.macports"
variable svn_path "@SVN@"
variable rsync_path "@RSYNC@"