[31924] branches/release_1_6/base/portmgr/dmg/postflight

jmpp at macports.org jmpp at macports.org
Tue Dec 11 22:08:36 PST 2007


Revision: 31924
          http://trac.macosforge.org/projects/macports/changeset/31924
Author:   jmpp at macports.org
Date:     2007-12-11 22:08:34 -0800 (Tue, 11 Dec 2007)

Log Message:
-----------

Another check against adding our settings to the MANPATH variable: if such exists but it's empty.
In that case, manpath(1) also jumps in to do its busines, and we wouldn't want to disturb that.

Correct some comments accordingly.

Modified Paths:
--------------
    branches/release_1_6/base/portmgr/dmg/postflight

Modified: branches/release_1_6/base/portmgr/dmg/postflight
===================================================================
--- branches/release_1_6/base/portmgr/dmg/postflight	2007-12-12 02:48:59 UTC (rev 31923)
+++ branches/release_1_6/base/portmgr/dmg/postflight	2007-12-12 06:08:34 UTC (rev 31924)
@@ -31,6 +31,7 @@
 # $Id$
 
 
+set -x
 # Abstraction variables:
 PREFIX=/opt/local
 BINPATH=$PREFIX/bin
@@ -99,13 +100,15 @@
     write_setting PATH
 fi
 
-# We gather the path into a variable of our own for quicker operation:
+# We gather the path into a variable of our own for faster operation:
 ORIGINAL_MANPATH="$($SHELL $LOGIN_FLAG -c "/usr/bin/printenv MANPATH")"
-# Adding out setting to the MANPATH variable only if it exists and, following that:
+# Adding out setting to the MANPATH variable only if it exists:
 if ! $SHELL $LOGIN_FLAG -c "/usr/bin/env | grep MANPATH" > /dev/null 2>&1 || \
-# if it doesn't already contain our path:
+# and following that, if it's not empty:
+  [ -z "$ORIGINAL_MAPNATH" ] || \
+# or if it doesn't already contain our path:
   echo "$ORIGINAL_MANPATH" | grep $MANPAGES > /dev/null 2>&1 || \
-# if there's no empty component somewhere in the middle of it:
+# or if there's no empty component somewhere in the middle of it:
   echo "$ORIGINAL_MANPATH" | grep :: || \
 # or at the start of it:
   [ -z "$(echo "$ORIGINAL_MANPATH" | awk -F : '{print $1}')" ] || \

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071211/f2609556/attachment.html


More information about the macports-changes mailing list