Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test-1.14 sorcery by Jaka Kranjc (343e41d0f18a343b12d57a66a249b9f3eb53f9f7)

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 test-1.14 sorcery by Jaka Kranjc (343e41d0f18a343b12d57a66a249b9f3eb53f9f7)
  • Date: Fri, 8 Aug 2008 07:57:30 -0500

GIT changes to test-1.14 sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 4 ++++
var/lib/sorcery/modules/libtablet | 34 +++++++++++++++-------------------
2 files changed, 19 insertions(+), 19 deletions(-)

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

libtablet: follow symbolic links when searching for the grimoire

(cherry-picked from commit 268e8f1e95922b0c2a11076212fc1d03d28a4e41)

commit fcc0233f37bdd3d4740514dcc66c08027cd9523c
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libtablet: fixed a coalescing regression #14618

(cherry-picked from commit c4e817f151784dbbdb7a7293561baa2b2eadca27)

diff --git a/ChangeLog b/ChangeLog
index 740d6f3..a62532e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-08 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libtablet: fixed a coalescing regression #14618
+ follow symbolic links when searching for the grimoire
+
2008-07-18 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libsorcery: fixed pop_queue to not create the queue if it doesn't
exist

diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 8f1f956..a4f168a 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -466,7 +466,7 @@ function tablet_install_spell_files() {
local section_files=$(find $SECTION_DIRECTORY -maxdepth 1 -type f)
if [[ $section_files ]] ; then cp $section_files section; fi

- local grimoire_files=$(find $GRIMOIRE -maxdepth 1 -type f)
+ local grimoire_files=$(find -L $GRIMOIRE -maxdepth 1 -type f)
if [[ $grimoire_files ]] ; then cp $grimoire_files grimoire; fi

# magic values we want to be able to easily look up
@@ -864,28 +864,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
- echo "Linking $car to ${cdr[$i]}" >> $link_log
- ln -f $car ${cdr[$i]}
- done
- done
- hash_unset tablet_coalesce
+ clear_line
}

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



  • [SM-Commit] GIT changes to test-1.14 sorcery by Jaka Kranjc (343e41d0f18a343b12d57a66a249b9f3eb53f9f7), Jaka Kranjc, 08/08/2008

Archive powered by MHonArc 2.6.24.

Top of Page