Skip to Content.
Sympa Menu

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

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 (bfa8b5ff3d3c9f335ab5a0af7703444162f906e9)
  • Date: Wed, 14 May 2008 13:57:56 -0500

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

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

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

libtablet: made tablet_create_version_cache logically simpler

diff --git a/ChangeLog b/ChangeLog
index 708ae2d..615cf9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-05-14 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libtablet: made tablet_create_version_cache logically simpler
+
2008-04-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libmisc: made smgl_dirname pass the last failing unit test

diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index aaeae79..0f9e641 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -697,6 +697,7 @@ function tablet_create_version_cache() {
local file=$1
local page_dir
local spell version patchlevel security_patch updated
+ local rc=0

for spell in $(get_all_spells_with_status ok); do
if tablet_find_spell_dir $spell page_dir; then
@@ -709,10 +710,13 @@ function tablet_create_version_cache() {
error_message "${PROBLEM_COLOR}Creation of the cache failed at
$spell," \
"please run cleanse --tablet and retry. If some spells" \
"have unfixable tablet pages, recast them.$DEFAULT_COLOR"
- rm $file
- return 1
+ rc=1
+ break
fi
done | sort > $file
+
+ [[ $rc == 1 ]] && rm $file
+ return $rc
}

#---------------------------------------------------------------------
@@ -724,7 +728,8 @@ function tablet_check_version_cache() {
[[ -z $1 ]] && return 1
local file=$1

- if [[ $file == $VERSION_STATUS ]] &&
+ if [[ -f $file ]] &&
+ [[ $file == $VERSION_STATUS ]] &&
[[ $(wc -l < $file) != $(get_all_spells_with_status ok | wc -l) ]]; then
error_message "${PROBLEM_COLOR}The tablet version cache is damaged,
removing it!"
error_message "$DEFAULT_COLOR"



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (bfa8b5ff3d3c9f335ab5a0af7703444162f906e9), Jaka Kranjc, 05/14/2008

Archive powered by MHonArc 2.6.24.

Top of Page