[88841] users/ryandesign/scripts/badpyports

ryandesign at macports.org ryandesign at macports.org
Fri Jan 13 01:55:54 PST 2012


Revision: 88841
          http://trac.macports.org/changeset/88841
Author:   ryandesign at macports.org
Date:     2012-01-13 01:55:53 -0800 (Fri, 13 Jan 2012)
Log Message:
-----------
badpyports: also find docdir problems

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

Modified: users/ryandesign/scripts/badpyports
===================================================================
--- users/ryandesign/scripts/badpyports	2012-01-13 09:08:30 UTC (rev 88840)
+++ users/ryandesign/scripts/badpyports	2012-01-13 09:55:53 UTC (rev 88841)
@@ -11,6 +11,7 @@
 PROBLEMPORTS=""
 DEPENDENCYPROBLEMS=0
 DEFAULTVERSIONPROBLEMS=0
+DOCDIRPROBLEMS=0
 for NAME in $NAMES; do
     STUBPORT=py-$NAME
     DEPS=$(port info --depends_lib --depends_build --depends_run --index --line $STUBPORT | sed 's/[^[:space:]]*://g')
@@ -32,27 +33,38 @@
             PROBLEMPORTS="$PROBLEMPORTS $STUBPORT"
         fi
     fi
+    if [ -n "$(grep -E '\$\{?prefix\}?/share/doc/\$\{?name\}?' $(port file $STUBPORT))" ]; then
+        printf "%s installs documentation that will conflict between subports\n" $STUBPORT
+        DOCDIRPROBLEMS=$(($DOCDIRPROBLEMS + 1))
+        PROBLEMPORTS="$PROBLEMPORTS $STUBPORT"
+    fi
 done
 
-TOTALPROBLEMPORTS=$(($DEPENDENCYPROBLEMS + $DEFAULTVERSIONPROBLEMS))
+TOTALPROBLEMS=$(($DEPENDENCYPROBLEMS + $DEFAULTVERSIONPROBLEMS + $DOCDIRPROBLEMS))
 
 echo
-printf "Out of %d ports using the unified python portgroup, %d have problems.\n" $TOTALPYPORTS $TOTALPROBLEMPORTS
+printf "Out of %d ports using the unified python portgroup, there are %d problems.\n" $TOTALPYPORTS $TOTALPROBLEMS
 
 if [ $DEPENDENCYPROBLEMS -gt 0 ]; then
     echo
-    printf "%d of these have dependency problems. Dependencies should only be declared in subports.\n" $DEPENDENCYPROBLEMS
+    printf "%d ports have dependency problems. Dependencies should only be declared in subports.\n" $DEPENDENCYPROBLEMS
     echo "Enclose dependencies and all other \"real\" port actions in an \"if {\${name} != \${subport}}\" block."
 fi
 
 if [ $DEFAULTVERSIONPROBLEMS -gt 0 ]; then
     echo
-    printf "%d of these have default python version problems. python.default_version needs to be\n" $DEFAULTVERSIONPROBLEMS
+    printf "%d ports have default python version problems. python.default_version needs to be\n" $DEFAULTVERSIONPROBLEMS
     echo "set to one of the values you set in python.versions."
 fi
 
-if [ $TOTALPROBLEMPORTS -gt 0 ]; then
+if [ $DOCDIRPROBLEMS -gt 0 ]; then
     echo
+    printf "%d ports have documentation directory problems. In ports with subports, documentation\n" $DOCDIRPROBLEMS
+    echo "should be installed into \${prefix}/share/doc/\${subport} rather than \${prefix}/share/doc/\${name}."
+fi
+
+if [ $TOTALPROBLEMS -gt 0 ]; then
+    echo
     echo "The maintainers of these ports are:"
     echo
     port info --maintainers --index --line $PROBLEMPORTS | tr ',' '\n' | sort -u
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120113/fbdd10c4/attachment.html>


More information about the macports-changes mailing list