[43954] trunk/base/portmgr/dmg

blb at macports.org blb at macports.org
Thu Dec 18 00:06:51 PST 2008


Revision: 43954
          http://trac.macports.org/changeset/43954
Author:   blb at macports.org
Date:     2008-12-18 00:06:45 -0800 (Thu, 18 Dec 2008)
Log Message:
-----------
portmgr/dmg - add InstallationCheck script to force each MacPorts package
to only install on the OS version for which it was built, and
InstallationCheck.strings to provide the error message when this fails;
takes care of ticket #13141

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

Added: trunk/base/portmgr/dmg/InstallationCheck
===================================================================
--- trunk/base/portmgr/dmg/InstallationCheck	                        (rev 0)
+++ trunk/base/portmgr/dmg/InstallationCheck	2008-12-18 08:06:45 UTC (rev 43954)
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# $Id$
+#
+# Check for proper OS version for the package (meant to be used by the
+# MacPorts port which replaces __DARWINVERS__ with the version of Darwin
+# needed).
+
+base_version=`uname -r | sed 's/\..*//'`
+if [[ ${base_version} != __DARWINVERS__ ]]; then
+   # This maps to message 16 in InstallationCheck.strings (Apple allows
+   # 16-31 for custom messages); that message should also be customized
+   # like this script
+   exit 112
+fi
+exit 0
+


Property changes on: trunk/base/portmgr/dmg/InstallationCheck
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/base/portmgr/dmg/InstallationCheck.strings
===================================================================
--- trunk/base/portmgr/dmg/InstallationCheck.strings	                        (rev 0)
+++ trunk/base/portmgr/dmg/InstallationCheck.strings	2008-12-18 08:06:45 UTC (rev 43954)
@@ -0,0 +1,2 @@
+"16" = "This package is meant to be installed on __XVERS__";
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081218/d591e6eb/attachment.html>


More information about the macports-changes mailing list