[62460] trunk/base/portmgr/dmg

jmr at macports.org jmr at macports.org
Fri Jan 8 10:09:19 PST 2010


Revision: 62460
          http://trac.macports.org/changeset/62460
Author:   jmr at macports.org
Date:     2010-01-08 10:09:16 -0800 (Fri, 08 Jan 2010)
Log Message:
-----------
better error message from InstallationCheck if uname or sed is missing (#23175)

Modified Paths:
--------------
    trunk/base/portmgr/dmg/InstallationCheck
    trunk/base/portmgr/dmg/InstallationCheck.strings

Modified: trunk/base/portmgr/dmg/InstallationCheck
===================================================================
--- trunk/base/portmgr/dmg/InstallationCheck	2010-01-08 17:54:31 UTC (rev 62459)
+++ trunk/base/portmgr/dmg/InstallationCheck	2010-01-08 18:09:16 UTC (rev 62460)
@@ -6,18 +6,23 @@
 # MacPorts port which replaces __DARWINVERS__ with the version of Darwin
 # needed).
 
+# error out if uname or sed can't be found
+if ! which uname > /dev/null || ! which sed > /dev/null; then
+    # message 16 in InstallationCheck.strings
+    exit 112
+fi
+
 base_version=`uname -r | sed 's/\..*//'`
 if [[ ${base_version} != __DARWINVERS__ ]]; then
-   # This maps to message 16 in InstallationCheck.strings (Apple allows
+   # This maps to message 17 in InstallationCheck.strings (Apple allows
    # 16-31 for custom messages); that message should also be customized
    # like this script
-   exit 112
+   exit 113
 fi
 
 if [[ -f /opt/local/etc/ports/dp_version ]]; then
-   # message 17 in InstallationCheck.strings
-   exit 113
+   # message 18 in InstallationCheck.strings
+   exit 114
 fi
 
 exit 0
-

Modified: trunk/base/portmgr/dmg/InstallationCheck.strings
===================================================================
--- trunk/base/portmgr/dmg/InstallationCheck.strings	2010-01-08 17:54:31 UTC (rev 62459)
+++ trunk/base/portmgr/dmg/InstallationCheck.strings	2010-01-08 18:09:16 UTC (rev 62460)
@@ -1,2 +1,3 @@
-"16" = "This package is meant to be installed on Mac OS X __XVERS__.";
-"17" = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";
+"16" = "Either uname or sed could not be found in PATH. Your system appears to be incomplete or misconfigured.";
+"17" = "This package is meant to be installed on Mac OS X __XVERS__.";
+"18" = "Your existing MacPorts or DarwinPorts installation is too old to be upgraded by this installer. Please install MacPorts 1.7.1 first.";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100108/d9270cfd/attachment.html>


More information about the macports-changes mailing list