[88842] users/ryandesign/scripts/badpyports

ryandesign at macports.org ryandesign at macports.org
Fri Jan 13 02:03:56 PST 2012


Revision: 88842
          http://trac.macports.org/changeset/88842
Author:   ryandesign at macports.org
Date:     2012-01-13 02:03:56 -0800 (Fri, 13 Jan 2012)
Log Message:
-----------
badpyports: new variable STUBFILE

Modified Paths:
--------------
    users/ryandesign/scripts/badpyports

Modified: users/ryandesign/scripts/badpyports
===================================================================
--- users/ryandesign/scripts/badpyports	2012-01-13 09:55:53 UTC (rev 88841)
+++ users/ryandesign/scripts/badpyports	2012-01-13 10:03:56 UTC (rev 88842)
@@ -14,6 +14,8 @@
 DOCDIRPROBLEMS=0
 for NAME in $NAMES; do
     STUBPORT=py-$NAME
+    STUBFILE="$(port file $STUBPORT)"
+    
     DEPS=$(port info --depends_lib --depends_build --depends_run --index --line $STUBPORT | sed 's/[^[:space:]]*://g')
     
     # If the port declares dependencies correctly, get the default python version.
@@ -26,14 +28,14 @@
         PROBLEMPORTS="$PROBLEMPORTS $STUBPORT"
     else
         # Get the file of the default subport. If the default is set incorrectly, this will be empty.
-        FILE=$(port file py$DEFAULTVERSION-$NAME 2>/dev/null)
+        FILE="$(port file py$DEFAULTVERSION-$NAME 2>/dev/null)"
         if [ -z "$FILE" ]; then
             printf "%s declares default python version %s but does not offer python version %s\n" $STUBPORT $DEFAULTVERSION $DEFAULTVERSION
             DEFAULTVERSIONPROBLEMS=$(($DEFAULTVERSIONPROBLEMS + 1))
             PROBLEMPORTS="$PROBLEMPORTS $STUBPORT"
         fi
     fi
-    if [ -n "$(grep -E '\$\{?prefix\}?/share/doc/\$\{?name\}?' $(port file $STUBPORT))" ]; then
+    if [ -n "$(grep -E '\$\{?prefix\}?/share/doc/\$\{?name\}?' "$STUBFILE")" ]; then
         printf "%s installs documentation that will conflict between subports\n" $STUBPORT
         DOCDIRPROBLEMS=$(($DOCDIRPROBLEMS + 1))
         PROBLEMPORTS="$PROBLEMPORTS $STUBPORT"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120113/da5fe2d4/attachment.html>


More information about the macports-changes mailing list