sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (89094ff0a759dc34e407182790cdac27425d1a90)
- 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 (89094ff0a759dc34e407182790cdac27425d1a90)
- Date: Tue, 3 Feb 2015 16:10:50 -0600
GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
ChangeLog | 7 +++++++
usr/sbin/gaze | 4 ++--
var/lib/sorcery/modules/libmisc | 16 ++++++++++++++++
var/lib/sorcery/modules/libtablet | 15 ++++++++-------
4 files changed, 33 insertions(+), 9 deletions(-)
New commits:
commit 89094ff0a759dc34e407182790cdac27425d1a90
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
ensure the hooks are always defined before use #592
commit 1a7cf00fe82ac728b5f9edb50a2d2355cd2c849f
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
init_hooks: added more docs on how the system works
commit 56bfcfe4cb690767196a35231526a648a052aa26
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libtablet: avoid tablet errors corrupting the version cache #553
commit 638b9c5fba265525c9e7c18d45e7884183d99f9c
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
gaze: orphans should not ignore runtime dependencies #570
diff --git a/ChangeLog b/ChangeLog
index 64d22c8..c931c91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-03 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * gaze: orphans should not ignore runtime dependencies #570
+ patch from Remko van der Vossen
+ * libtablet: avoid tablet errors corrupting the version cache #553
+ * libmisc: added more docs to init_hooks
+ ensure the hooks are always defined before use #592
+
2015-01-09 Ismael Luceno <ismael AT sourcemage.org>
* gaze: Made gaze versions take multiple arguments
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 00b1faa..6ac0ca3 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -967,7 +967,7 @@ function gaze_activate_voyeur() {
#-----
function show_orphans() {
local spell each
- compute_reverse_installed_depends my_hash
+ compute_reverse_installed_depends my_hash all
for each in $(get_all_spells_with_status ok); do
hash_get_ref my_hash $each spell
if [[ ! $spell ]]; then
@@ -981,7 +981,7 @@ function show_orphans() {
#-----
function show_non_orphans() {
local spell each
- compute_reverse_installed_depends my_hash
+ compute_reverse_installed_depends my_hash all
for each in $(get_all_spells_with_status ok); do
hash_get_ref my_hash $each spell
if [[ $spell ]]; then
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index f1e1a4e..28d5547 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -339,6 +339,19 @@ function clear_line() {
## send_that_mail
## }
##
+## We iterate over all hook names and hook files, constructing
+## hook functions that are either NOOPs or run any designated
+## functions (one or more).
+##
+## Example how post_SUCCESS_hook ends up:
+## function sorcery_default_post_SUCCESS_hook() {
+## local ANTE_RC=$1;
+## mail_post_SUCCESS_hook
+## sound_post_SUCCESS_hook
+## }
+##
+## One would run it by calling: run_hook SUCCESS post
+##
#---------------------------------------------------------------------
function init_hooks() {
debug "libmisc" "init_hooks - starting"
@@ -418,6 +431,9 @@ function run_hook() {
local spell_file="$1"
local hook_order="$2"
local rc=$3
+
+ init_hooks # usually inited before, but better be safe than sorry
+
case $spell_file in
DETAILS|CONFLICTS|PRE_SUB_DEPENDS|SUB_DEPENDS) return 0 ;;
*)
diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 4c829e1..c05fad0 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -339,7 +339,7 @@ function tablet_unload_roots() {
function tablet_get_tb_version() {
local tb_dir=$1
if ! [[ $tb_dir ]] ; then
- message "nothing passed in!"
+ error_message "nothing passed in!"
return 1
fi
if ! test -f $tb_dir/tb_version ||
@@ -348,7 +348,7 @@ function tablet_get_tb_version() {
fi
local ____tb_version=$(<$tb_dir/tb_version)
if test $____tb_version -gt $TABLET_MAX_VERSION; then
- message "${PROBLEM_COLOR}This sorcery is too old for tablet version" \
+ error_message "${PROBLEM_COLOR}This sorcery is too old for tablet
version" \
"$tb_version! Please update to the newer version of sorcery" \
"or recast this spell${DEFAULT_COLOR}"
return 255
@@ -750,11 +750,12 @@ function tablet_create_version_cache() {
local ok_spells=( $(get_all_spells_with_status ok) )
for spell in ${ok_spells[@]}; do
- if tablet_find_spell_dir $spell page_dir; then
- tablet_get_version $page_dir version
- tablet_get_patchlevel $page_dir patchlevel
- tablet_get_security_patch $page_dir security_patch
- tablet_get_updated $page_dir updated
+ # make sure we don't get any rare errors into our carefully crafted list
+ if tablet_find_spell_dir $spell page_dir > /dev/null; then
+ tablet_get_version $page_dir version > /dev/null
+ tablet_get_patchlevel $page_dir patchlevel > /dev/null
+ tablet_get_security_patch $page_dir security_patch > /dev/null
+ tablet_get_updated $page_dir updated > /dev/null
echo "$spell ${version:-0} ${patchlevel:-0} ${security_patch:-0}
${updated:-0}"
elif [[ $spell == alter ]]; then
version=$(installed_version alter)
- [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (89094ff0a759dc34e407182790cdac27425d1a90), Jaka Kranjc, 02/03/2015
Archive powered by MHonArc 2.6.24.