Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (c4e817f151784dbbdb7a7293561baa2b2eadca27)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (c4e817f151784dbbdb7a7293561baa2b2eadca27)
  • Date: Fri, 8 Aug 2008 07:05:02 -0500

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 3 +++
var/lib/sorcery/modules/libtablet | 34 ++++++++++++++--------------------
2 files changed, 17 insertions(+), 20 deletions(-)

New commits:
commit c4e817f151784dbbdb7a7293561baa2b2eadca27
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libtablet: fixed a coalescing regression #14618

diff --git a/ChangeLog b/ChangeLog
index e801395..1f6c989 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-08-08 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libtablet: fixed a coalescing regression #14618
+
2008-07-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libdispel: never fail when trying to remove the spell from the queue

diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index eee7fa8..35b935c 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -923,30 +923,24 @@ function tablet_coalesce_files() {
local link_log=${2:-$TMP_DIR}/link_log

local total_files=$(find $dir -type f 2>/dev/null|wc -l)
- message "Computing md5sum of $total_files tablet files"
+ message
+ message "Computing the md5sums of $total_files tablet files and coalescing
all the duplicates..."
# the + makes find stack found files, so md5sum is invoked a lot less often
- find $dir -type f -exec md5sum {} + 2>/dev/null |
- while read line; do
- hash_append tablet_coalesce $line
+ find $dir -type f -exec md5sum {} + 2>/dev/null | sort |
+ while read sum file; do
+ if [[ -z $previous_sum || $previous_sum != $sum ]]; then
+ previous_sum=$sum
+ previous_file=$file
+ else
+ if ! [[ $previous_file -ef $file ]]; then
+ echo "Linking $previous_file to $file" >> $link_log
+ ln -f $previous_file $file
+ fi
+ fi
let i+=1
progress_bar $i $total_files
done
- message ""
-
- # hash_get_table dumps out the table values one per line
- # they are read into the stuff array and then if theres more than one
- # thing we force hardlink them together
- message "Coalescing files.."
- hash_get_table tablet_coalesce| while read -a cdr; do
- car=${cdr[0]}
- for (( i=1 ; i<${#cdr[*]} ; i++ )) ; do
- if ! [[ $car -ef ${cdr[$i]} ]]; then
- echo "Linking $car to ${cdr[$i]}" >> $link_log
- ln -f $car ${cdr[$i]}
- fi
- done
- done
- hash_unset tablet_coalesce
+ clear_line
}

###################### Version 0 repair functions ####################



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (c4e817f151784dbbdb7a7293561baa2b2eadca27), Jaka Kranjc, 08/08/2008

Archive powered by MHonArc 2.6.24.

Top of Page