[43375] trunk/base

jmpp at macports.org jmpp at macports.org
Tue Dec 9 20:49:53 PST 2008


Revision: 43375
          http://trac.macports.org/changeset/43375
Author:   jmpp at macports.org
Date:     2008-12-09 20:49:53 -0800 (Tue, 09 Dec 2008)
Log 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.8.0
 (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...

Modified Paths:
--------------
    trunk/base/configure
    trunk/base/configure.ac
    trunk/base/portmgr/ReleaseProcess
    trunk/base/src/macports1.0/macports.tcl
    trunk/base/src/macports1.0/macports_autoconf.tcl.in

Removed Paths:
-------------
    trunk/base/config/mp_version

Deleted: trunk/base/config/mp_version
===================================================================
--- trunk/base/config/mp_version	2008-12-10 04:30:21 UTC (rev 43374)
+++ trunk/base/config/mp_version	2008-12-10 04:49:53 UTC (rev 43375)
@@ -1 +0,0 @@
-1.800

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2008-12-10 04:30:21 UTC (rev 43374)
+++ trunk/base/configure	2008-12-10 04:49:53 UTC (rev 43375)
@@ -752,7 +752,6 @@
 CFLAGS
 CC
 SW_VERS
-MP_VERSION
 MACPORTS_VERSION
 target_os
 target_vendor
@@ -2168,10 +2167,7 @@
 { $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.
 
 	oldprefix=$prefix

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2008-12-10 04:30:21 UTC (rev 43374)
+++ trunk/base/configure.ac	2008-12-10 04:49:53 UTC (rev 43375)
@@ -12,9 +12,6 @@
 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

Modified: trunk/base/portmgr/ReleaseProcess
===================================================================
--- trunk/base/portmgr/ReleaseProcess	2008-12-10 04:30:21 UTC (rev 43374)
+++ trunk/base/portmgr/ReleaseProcess	2008-12-10 04:49:53 UTC (rev 43375)
@@ -66,13 +66,10 @@
 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

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2008-12-10 04:30:21 UTC (rev 43374)
+++ trunk/base/src/macports1.0/macports.tcl	2008-12-10 04:49:53 UTC (rev 43375)
@@ -1866,19 +1866,26 @@
     }
 
     # 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
     }
-    # get downloaded MacPorts version
-    gets $fd macports_version_new
-    close $fd
-    # echo downloaded MacPorts version
-    ui_msg "Downloaded MacPorts base version $macports_version_new"
 
+    # 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
+    }
+
     # check if we we need to rebuild base
     if {$use_the_force_luke == "yes" || [rpm-vercomp $macports_version_new $macports::autoconf::macports_version] > 0} {
         if {[info exists options(ports_selfupdate_pretend)] && $options(ports_selfupdate_pretend) == "yes"} {

Modified: trunk/base/src/macports1.0/macports_autoconf.tcl.in
===================================================================
--- trunk/base/src/macports1.0/macports_autoconf.tcl.in	2008-12-10 04:30:21 UTC (rev 43374)
+++ trunk/base/src/macports1.0/macports_autoconf.tcl.in	2008-12-10 04:49:53 UTC (rev 43375)
@@ -33,7 +33,7 @@
 
 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@"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081209/6c19934a/attachment.html>


More information about the macports-changes mailing list