[43956] branches/release_1_7

blb at macports.org blb at macports.org
Thu Dec 18 00:10:29 PST 2008


Revision: 43956
          http://trac.macports.org/changeset/43956
Author:   blb at macports.org
Date:     2008-12-18 00:10:28 -0800 (Thu, 18 Dec 2008)
Log Message:
-----------
portmgr/dmg - merge r43954 from trunk: 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:
-----------
    branches/release_1_7/base/portmgr/dmg/InstallationCheck
    branches/release_1_7/base/portmgr/dmg/InstallationCheck.strings

Property Changed:
----------------
    branches/release_1_7/


Property changes on: branches/release_1_7
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:42683,42697,42734,42747,42760,42845-42847,42865,42962,42978,43001,43080,43083,43097,43140,43153,43194,43216-43217,43229,43704-43705,43733,43946
   + /trunk:42683,42697,42734,42747,42760,42845-42847,42865,42962,42978,43001,43080,43083,43097,43140,43153,43194,43216-43217,43229,43704-43705,43733,43946,43954

Copied: branches/release_1_7/base/portmgr/dmg/InstallationCheck (from rev 43954, trunk/base/portmgr/dmg/InstallationCheck)
===================================================================
--- branches/release_1_7/base/portmgr/dmg/InstallationCheck	                        (rev 0)
+++ branches/release_1_7/base/portmgr/dmg/InstallationCheck	2008-12-18 08:10:28 UTC (rev 43956)
@@ -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
+

Copied: branches/release_1_7/base/portmgr/dmg/InstallationCheck.strings (from rev 43954, trunk/base/portmgr/dmg/InstallationCheck.strings)
===================================================================
--- branches/release_1_7/base/portmgr/dmg/InstallationCheck.strings	                        (rev 0)
+++ branches/release_1_7/base/portmgr/dmg/InstallationCheck.strings	2008-12-18 08:10:28 UTC (rev 43956)
@@ -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/de62bbfe/attachment.html>


More information about the macports-changes mailing list