r3701 - jhalfs/branches/ablfs/BLFS

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Thu Apr 18 09:15:26 PDT 2013


Author: pierre
Date: Thu Apr 18 09:15:26 2013
New Revision: 3701

Log:
Order the depdendencies in xorg
packages according to the order in the "cat"
command, rather than the order of the entity declarations

Modified:
   jhalfs/branches/ablfs/BLFS/gen-special.sh

Modified: jhalfs/branches/ablfs/BLFS/gen-special.sh
==============================================================================
--- jhalfs/branches/ablfs/BLFS/gen-special.sh	Mon Apr 15 14:39:44 2013	(r3700)
+++ jhalfs/branches/ablfs/BLFS/gen-special.sh	Thu Apr 18 09:15:26 2013	(r3701)
@@ -97,9 +97,15 @@
   cat >> tmpfile << EOF
       <xsl:when test="\$section='$id'">
 EOF
-# In the list, the preceding package is a dependency of the following,
-# except the first:
-  precpack=NONE
+# We extract the list of packages for an xorg page from
+# the version part of the .xml file. Seems that
+# the order is not always the same as in the "cat" command.
+# So we have to read that command too, since it may be assumed
+# that the preceding package is a dependency of the following,
+# except the first.
+  list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF' |
+                 sed 's/^[^ ]*\ *\([^&]*\).*/\1/' | sed 's/-$//')"
+
 # Rationale for the sed below: the following for breaks words at spaces (unless
 # we tweak IFS). So replace spaces with commas in lines so that only newlines
 # are separators.
@@ -107,6 +113,12 @@
       $(grep 'ENTITY.*version' $file | sed 's/[ ]\+/,/g'); do
     packname=$(echo $pack | sed s'@.*ENTITY,\(.*\)-version.*@\1@')
     packversion=$(echo $pack | sed 's@[^"]*"\([^"]*\).*@\1@')
+    precpack=NONE
+    for i in $list_cat; do
+      if [ "$i" = "$packname" ]; then break; fi
+      precpack=$i
+    done
+
     cat >>$SPECIAL_FILE << EOF
         <module><xsl:text>&#xA;          </xsl:text>
           <xsl:element name="name">$packname</xsl:element>
@@ -149,7 +161,6 @@
           <xsl:attribute name="type">ref</xsl:attribute>
         </xsl:element>
 EOF
-    precpack=$packname
   done
   cat >>$SPECIAL_FILE << EOF
      </package>



More information about the alfs-log mailing list