r2018 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon Sep 26 11:07:57 PDT 2005


Author: manuel
Date: 2005-09-26 12:07:56 -0600 (Mon, 26 Sep 2005)
New Revision: 2018

Added:
   jhalfs/trunk/jhalfs-0.2-debian_31_as_host-1.patch
Log:
Added optional patch from Jhon Kelly.

Added: jhalfs/trunk/jhalfs-0.2-debian_31_as_host-1.patch
===================================================================
--- jhalfs/trunk/jhalfs-0.2-debian_31_as_host-1.patch	2005-09-25 16:56:00 UTC (rev 2017)
+++ jhalfs/trunk/jhalfs-0.2-debian_31_as_host-1.patch	2005-09-26 18:07:56 UTC (rev 2018)
@@ -0,0 +1,55 @@
+Submitted By: Jhon Kelly (jakelly at shtc dot net)
+Date: 2005-09-26
+Initial Package Version: 0.2
+Origin: alfs-discuss
+Upstream Status: Optional
+Description: Allow jhalfs to work with a md5sum program
+that don't accept - as filename, like the one shipped with
+Debian 3.1 stable.
+
+--- jhalfs.orig 2005-09-25 17:17:15.000000000 -0400
++++ jhalfs  2005-09-25 19:12:12.000000000 -0400
+@@ -189,9 +189,12 @@
+   DIR=`echo $1 | sed 's at -doc@@'`
+
+   # Find the md5 sum for this package.
+-  if [ $2 != MD5SUMS ] ; then MD5=`grep "  $2" MD5SUMS` ; fi
++  if [ $2 != MD5SUMS ] ; then
++    MD5=$(grep " $2" MD5SUMS | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/ /g')
++    md5_file=${MD5#* } ; md5_chksum=${MD5% *}
++  fi
+
+-  if [ ! -f $2 ] ; then
++  if [ ! -f $2 -o $2 == MD5SUMS ] ; then
+     case $DL in
+       wget )
+         wget $HTTP/$DIR/$2
+@@ -203,7 +206,7 @@
+         echo "$DL not supported at this time."
+         ;;
+     esac
+-  elif ! echo "$MD5" | md5sum -c - >/dev/null 2>/dev/null ; then
++  elif [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then
+     case $DL in
+       wget )
+         wget -c $HTTP/$DIR/$2
+@@ -216,8 +219,11 @@
+         ;;
+     esac
+   fi
+-  if [ $2 != MD5SUMS ] && ! echo "$MD5" | md5sum -c - ; then
+-    exit 1
++  if [ $2 != MD5SUMS ] ; then
++     if [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then
++       echo "$2 md5 checksum does not match $md5_chksum"
++       exit 1
++     fi
+   fi
+ }
+
+--
+http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
+FAQ: http://www.linuxfromscratch.org/faq/
+Unsubscribe: See the above information page
+
+


Property changes on: jhalfs/trunk/jhalfs-0.2-debian_31_as_host-1.patch
___________________________________________________________________
Name: svn:keywords
   + "Author Date Revision Id"




More information about the alfs-log mailing list