[PC-BSD Commits] r4029 - pbibuild/pbi-source/PBIsource

svn at pcbsd.org svn at pcbsd.org
Tue Jun 2 13:39:00 PDT 2009


Author: kris
Date: 2009-06-02 13:39:00 -0700 (Tue, 02 Jun 2009)
New Revision: 4029

Modified:
   pbibuild/pbi-source/PBIsource/pbi.cpp
Log:

Fixed a bug reading ldconfig data in PBI



Modified: pbibuild/pbi-source/PBIsource/pbi.cpp
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.cpp	2009-06-02 17:56:25 UTC (rev 4028)
+++ pbibuild/pbi-source/PBIsource/pbi.cpp	2009-06-02 20:39:00 UTC (rev 4029)
@@ -643,18 +643,20 @@
 
              if ( LibDir == "Auto")
 	     {
-                   stream2 << "# Check and parse any ldconfig entries\n";
+                   stream2 << "\n# Check and parse any ldconfig entries\n";
                    stream2 << "LDCONFIGDIRS=\"\"\n";
                    stream2 << "if [ -d \"${PROGDIR}/libdata/ldconfig\" ]\n";
                    stream2 << "then\n";
                    stream2 << "  for i in `ls ${PROGDIR}/libdata/ldconfig`\n";
                    stream2 << "  do\n";
-                   stream2 << "    TMP=`cat ${PROGDIR}/libdata/ldconfig/${i}`\n";
-                   stream2 << "    echo $LDCONFIGDIRS | grep \"${TMP}:\" >/dev/null 2>/dev/null\n";
-                   stream2 << "    if [ \"$?\" != \"0\" ]\n";
-                   stream2 << "    then\n";
-                   stream2 << "      LDCONFIGDIRS=\"${TMP}:${LDCONFIGDIRS}\"\n";
-                   stream2 << "    fi\n";
+                   stream2 << "    while read TMP\n";
+                   stream2 << "    do\n";
+                   stream2 << "      echo $LDCONFIGDIRS | grep \"${TMP}:\" >/dev/null 2>/dev/null\n";
+                   stream2 << "      if [ \"$?\" != \"0\" ]\n";
+                   stream2 << "      then\n";
+                   stream2 << "        LDCONFIGDIRS=\"${TMP}:${LDCONFIGDIRS}\"\n";
+                   stream2 << "      fi\n";
+                   stream2 << "    done < ${PROGDIR}/libdata/ldconfig/${i}\n";
                    stream2 << "  done\n";
                    stream2 << "fi\n";
 



More information about the Commits mailing list