r2373 - in jhalfs/branches/experimental: HLFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon Mar 20 13:53:25 PST 2006


Author: manuel
Date: 2006-03-20 14:53:24 -0700 (Mon, 20 Mar 2006)
New Revision: 2373

Modified:
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/HLFS/patcheslist.xsl
   jhalfs/branches/experimental/common/common-functions
Log:
Download only the packages and patches required by each libc implementation.

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-03-20 19:11:18 UTC (rev 2372)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-03-20 21:53:24 UTC (rev 2373)
@@ -35,7 +35,6 @@
   # Iterate through each package and grab it, along with any patches it needs.
   for i in `cat $JHALFSDIR/packages` ; do
     PKG=`echo $i | sed -e 's/-version.*//' \
-                       -e 's/-file.*//' \
                        -e 's/uclibc/uClibc/' `
 
     #
@@ -43,27 +42,43 @@
     #
     VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
     case "$PKG" in
-      "uClibc-patch" )      continue ;;
+      "gcc" )
+        download $PKG "gcc-core-$VRS.tar.bz2"
+        download $PKG "gcc-g++-$VRS.tar.bz2"
+        if [ ! "$TEST" = "0" ] ; then
+          download $PKG "gcc-testsuite-$VRS.tar.bz2" ;
+        fi
+        ;;
 
-      "tcl" )   FILE="$PKG$VRS-src.tar.bz2" ; download $PKG $FILE ;;
+      "glibc")
+        if [ "$MODEL" = "glibc" ] ; then
+          download $PKG "$PKG-$VRS.tar.bz2"
+          download $PKG "$PKG-libidn-$VRS.tar.bz2"
+        fi
+        ;;
 
-      "uClibc-locale" ) FILE="$PKG-$VRS.tgz" ; PKG="uClibc"
-                download $PKG $FILE
-                # There can be no patches for this file
-                continue ;;
+      "tcl" )
+        FILE="$PKG$VRS-src.tar.bz2" ; download $PKG $FILE ;;
 
-      "gcc" )   download $PKG "gcc-core-$VRS.tar.bz2"
-                download $PKG "gcc-g++-$VRS.tar.bz2"
-                if [ ! "$TEST" = "0" ] ; then
-                  download $PKG "gcc-testsuite-$VRS.tar.bz2" ;
-                fi
+      "uclibc" )
+        if [ "$MODEL" = "uclibc" ] ; then
+          download $PKG "$PKG-$VRS.tar.bz2"
+        fi
         ;;
-      "glibc")  download $PKG "$PKG-$VRS.tar.bz2"
-                download $PKG "$PKG-libidn-$VRS.tar.bz2"
+
+      "uClibc-locale" )
+        if [ "$MODEL" = "uclibc" ] ; then
+          FILE="$PKG-$VRS.tgz" ; PKG="uClibc"
+          download $PKG $FILE
+          # There can be no patches for this file
+          continue
+        fi
         ;;
-      * )     FILE="$PKG-$VRS.tar.bz2"
-              download $PKG $FILE
-        ;;
+
+      "uClibc-patch" )      continue ;;
+
+      * )
+        FILE="$PKG-$VRS.tar.bz2" ;  download $PKG $FILE ;;
     esac
 
     for patch in `grep "$PKG-&$PKG" $JHALFSDIR/patches` ; do

Modified: jhalfs/branches/experimental/HLFS/patcheslist.xsl
===================================================================
--- jhalfs/branches/experimental/HLFS/patcheslist.xsl	2006-03-20 19:11:18 UTC (rev 2372)
+++ jhalfs/branches/experimental/HLFS/patcheslist.xsl	2006-03-20 21:53:24 UTC (rev 2373)
@@ -1,22 +1,25 @@
 <?xml version='1.0' encoding='ISO-8859-1'?>
 
-<!-- Get list of patch files from the BLFS Book -->
-<!-- $LastChangedBy$ -->
-<!-- $Date$ -->
+<!-- $Id$ -->
+<!-- Get list of patch files from the HLFS Book -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
 
   <xsl:output method="text"/>
 
+  <!-- What libc implentation must be used? -->
+  <xsl:param name="model" select="glibc"/>
+
   <!-- No text needed -->
   <xsl:template match="//text()">
     <xsl:text/>
   </xsl:template>
 
-  <!-- Just grab the url from the ulink tags that have .patch in the name -->
+  <!-- Just grab the url from the patches.xml file -->
   <xsl:template match="//ulink">
-    <xsl:if test="contains(@url, '.patch') or contains(@url, '.patch.gz') and contains(@url, 'linuxfromscratch')">
+    <xsl:if test="ancestor::varlistentry[@condition=$model]
+            or not(ancestor::varlistentry[@condition])">
        <xsl:value-of select="@url"/>
        <xsl:text>&#x0a;</xsl:text>
     </xsl:if>

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-03-20 19:11:18 UTC (rev 2372)
+++ jhalfs/branches/experimental/common/common-functions	2006-03-20 21:53:24 UTC (rev 2373)
@@ -556,10 +556,10 @@
 
   xsltproc --nonet \
            --xinclude \
+           --stringparam model $MODEL \
            -o patcheslist_.wget \
            patcheslist.xsl \
            $BOOK/chapter04/patches.xml
-	   #> /dev/null 2>&1
 
   rm -f patches
 




More information about the alfs-log mailing list