r2659 - jhalfs/branches/experimental/common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat May 6 13:04:46 PDT 2006


Author: manuel
Date: 2006-05-06 14:04:45 -0600 (Sat, 06 May 2006)
New Revision: 2659

Modified:
   jhalfs/branches/experimental/common/common-functions
   jhalfs/branches/experimental/common/urls.xsl
Log:
Merged r2658 from trunk.

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-05-06 20:03:02 UTC (rev 2658)
+++ jhalfs/branches/experimental/common/common-functions	2006-05-06 20:04:45 UTC (rev 2659)
@@ -646,7 +646,7 @@
 get_sources() {              # Download file, write name to MISSING_FILES.DMP if an error
 #----------------------------#
   local saveIFS=$IFS
-  local IFS line URL1 URL2 FILE MD5 HAVEMD5 fromARCHIVE
+  local IFS line URL1 URL2 FILE BOOKMD5 MD5 HAVEMD5 fromARCHIVE
 
     # Test if the packages must be downloaded
   [ ! "$GETPKG" = "1" ] && return
@@ -686,17 +686,23 @@
       # Locations
     URL1=`echo $line | cut -d" " -f2` # Preferred URL
     URL2=`echo $line | cut -d" " -f1` # Fallback Upstream URL
-    FILE=`basename $URL2` # File name
+    FILE=`basename $URL1` # File name
+    BOOKMD5=`echo $line | cut -d" " -f3` # MD5 book value
 
-      # Find the md5 sum for this package.
-    set +e
-    HAVEMD5=1  # Always assume we have a MD5SUM
-    MD5=`grep "  $FILE" MD5SUMS`
-    if [ $? -ne 0 ]; then
-      set -e
-      gs_wrt_message "$FILE not found in MD5SUMS"
-        # IMPORTANT:: There is no MD5SUM for this file.
-      HAVEMD5=0
+    if [[ x"$BOOKMD5" != "x" ]]; then
+      HAVEMD5=1
+      MD5="$BOOKMD5  $FILE"
+    else
+      # Find the md5 sum for this package in the server MD5SUMS file.
+      set +e
+      HAVEMD5=1  # Always assume we have a MD5SUM
+      MD5=`grep "  $FILE" MD5SUMS`
+      if [ $? -ne 0 ]; then
+        set -e
+        gs_wrt_message "$FILE not found in MD5SUMS"
+          # IMPORTANT:: There is no MD5SUM for this file.
+        HAVEMD5=0
+      fi
     fi
 
     set -e

Modified: jhalfs/branches/experimental/common/urls.xsl
===================================================================
--- jhalfs/branches/experimental/common/urls.xsl	2006-05-06 20:03:02 UTC (rev 2658)
+++ jhalfs/branches/experimental/common/urls.xsl	2006-05-06 20:04:45 UTC (rev 2659)
@@ -41,10 +41,16 @@
       </xsl:variable>
       <xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
       <!-- Write the upstream URLs, except the redirected ones -->
-      <xsl:if test="not(contains(@url,'?'))">
-        <xsl:value-of select="@url"/>
-      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="contains(@url,'?')">
+          <xsl:text>dummy-url</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="@url"/>
+        </xsl:otherwise>
+      </xsl:choose>
       <xsl:text> </xsl:text>
+      <!-- Write FTP mirror URLs -->
       <xsl:value-of select="$server"/>
       <xsl:text>/pub/lfs/conglomeration/</xsl:text>
       <xsl:choose>
@@ -74,6 +80,9 @@
         </xsl:otherwise>
       </xsl:choose>
       <xsl:value-of select="$package"/>
+      <!-- Write MD5SUM value -->
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="../../para[3]/literal"/>
       <xsl:text>&#x0a;</xsl:text>
     </xsl:if>
   </xsl:template>




More information about the alfs-log mailing list