Skip to Content.
Sympa Menu

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

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 (763171bd0e6ba0a8f72dba9d3c6f20de6c11cb56)
  • Date: Thu, 30 Dec 2010 08:24:37 -0600

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

ChangeLog | 1 +
usr/sbin/gaze | 37
++++++++++++++++++++++---------------
var/lib/sorcery/modules/libtablet | 2 +-
3 files changed, 24 insertions(+), 16 deletions(-)

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

fixed braino in 30087339fa3

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

gaze versions should show the correct grimoire when using cast -g #15745

diff --git a/ChangeLog b/ChangeLog
index 503ad70..2245826 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
* config, libsorcery: be a bit more smart about setting the pager
#15793
* libtablet: store the grimoire name in the tablet, part of #8370
fixed the section name fetching in tablet_set_spell
+ * gaze: versions show the correct grimoire when using cast -g #15745

2010-10-19 Bor Kraljič <pyrobor AT ver.si>
* libsummon: moved sanity check of source to right after download
(#15886)
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index d729199..0870cb2 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -1217,41 +1217,48 @@ function gaze_show_version() {
function gaze_show_versions() {

local SPELL=$1
- local SPELL_DIRECTORY=
- local GRIMOIRE=
- local GRIMOIRES=
- local ECHO_INSTALLED=1
- local GRIMOIRE_NAME

if ! codex_does_spell_exist $SPELL
then return 1
fi

- local INSTALLED=`installed_version $SPELL`
-
- GRIMOIRES=$(codex_get_all_grimoires)
-
(

echo "Grimoire|Section|Spell|Grimoire Version|Installed Version"
echo "--------|-------|-----|----------------|-----------------"

- for GRIMOIRE in $GRIMOIRES
+ #saving them, since they will be overwritten later
+ if tablet_find_spell_dir "$SPELL" tablet; then
+ # TODO: change this if it will be stored in the less volatile
state/packages file
+ tablet_get_grimoire_name $tablet installed_grimoire
+ fi
+ installed=$(installed_version $SPELL)
+
+ for grimoire in $(codex_get_all_grimoires)
do
- if SPELL_DIRECTORY=$(codex_cache_spell_lookup $SPELL $GRIMOIRE)
+ if SPELL_DIRECTORY=$(codex_cache_spell_lookup $SPELL $grimoire)
then
codex_set_current_spell $SPELL_DIRECTORY

- if [ $ECHO_INSTALLED -eq 1 ]
+ # old states don't have the name stored so fall back to similar old
+ # broken behaviour where the first matching grimoire was used
+ [[ -z $installed_grimoire ]] && installed_grimoire=$GRIMOIRE_NAME
+
+ if [[ $GRIMOIRE_NAME == $installed_grimoire ]]
then
- echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|${INSTALLED:="-"}"
- ECHO_INSTALLED=0
+ echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|${installed:="-"}"
else
echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|-"
fi

else
- echo "$(smgl_basename $GRIMOIRE)|-|-|-|-"
+ # handle also (re)moved spells
+ smgl_basename "$grimoire" name
+ if [[ $name == $installed_grimoire ]]; then
+ echo "$name|-|-|-|$installed"
+ else
+ echo "$name|-|-|-|-"
+ fi
fi
done

diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 45e1b21..20f6441 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -264,7 +264,7 @@ function tablet_get_grimoire_name() {
1) test -f $tb_dir/grimoire_name && value=$(<$tb_dir/grimoire_name) ||
return 2 ;;
*) return 3 ;;
esac
- eval "$3=\"$value\""
+ eval "$2=\"$value\""
return 0
}




  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (763171bd0e6ba0a8f72dba9d3c6f20de6c11cb56), Jaka Kranjc, 12/30/2010

Archive powered by MHonArc 2.6.24.

Top of Page