Skip to Content.
Sympa Menu

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

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 (8e61606661900e18649c197a930b6296c7655b16)
  • Date: Sat, 10 Oct 2009 05:41:44 -0500

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

ChangeLog | 6 ++++++
usr/sbin/cast | 24 ------------------------
usr/sbin/delve | 14 ++++++++++++++
usr/share/man/man8/delve.8 | 11 +++++++++--
var/lib/sorcery/modules/build_api/api2 | 9 +++++++--
var/lib/sorcery/modules/libsorcery | 23 +++++++++++++++++++++++
var/lib/sorcery/protected | 1 +
7 files changed, 60 insertions(+), 28 deletions(-)

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

* cast: moved override_grimoires to libsorcery
* delve: added support for overriding grimoires with -g #15211
* api2: call delve with -g when not working with all grimoires #15211

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

protected: added tr for heisenbug #15408

diff --git a/ChangeLog b/ChangeLog
index 5dfd325..81c8f41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-10 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * protected: added tr for heisenbug #15408
+ * cast: moved override_grimoires to libsorcery
+ * delve: added support for overriding grimoires with -g #15211
+ * api2: call delve with -g when not working with all grimoires #15211
+
2009-09-04 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* api2: fixed two debug statements
* install: symlink also host dependent compiler names, so ccache and
diff --git a/usr/sbin/cast b/usr/sbin/cast
index b1beb0b..0db05e8 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -204,30 +204,6 @@ function get_option() {
}

#---------------------------------------------------------------------
-## Check that we have all the passed grimoires and use them to
-## override the default selection (all)
-#---------------------------------------------------------------------
-function override_grimoires() {
- local grimoires=$1
- local grimoire
-
- for grimoire in $grimoires; do
- if ! codex_find_grimoire $grimoire > /dev/null; then
- error_message "Grimoire $grimoire does not exist!"
- if query "Do you want to add it?" y; then
- scribe add $grimoire || exit 13
- echo
- else
- list_remove grimoires $grimoire
- fi
- fi
- done
- [[ -z $grimoires ]] && message "Using default grimoire selection!\n"
-
- export OVERRIDE_GRIMOIRES="$grimoires"
-}
-
-#---------------------------------------------------------------------
## Cast a single spell. When this function is called, all dependencies
## have been taken care of and we are allowed to cast this.
## @Globals SPELL
diff --git a/usr/sbin/delve b/usr/sbin/delve
index f0758a4..766a6f1 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -31,6 +31,14 @@ Parameters
-f | --force Continue running files even if one fails
(use with caution!)

+-g | --grimoire [...] Use only the specified grimoires for this
cast
+ NOTE: If there are any cross-grimoire
+ dependencies on unspecified grimoires they
+ will not work. The target spell will
+ not be found. To avoid this, specify all
+ relevant grimoires to the -g parameter
+ in the order you wish them to be searched.
+
-c | --continue start end Run all the files from start to end:

delve -c start BUILD spellname
@@ -362,6 +370,8 @@ function process_parameters() {
continue_end=$3
shift 2
;;
+ -g|--grimoire*) override_grimoires "$2";
+ shift 2 ;;
start) ;;
PRE_BUILD) STATES="$STATES $param" ;;
config_loc) STATES="$STATES $param" ;;
@@ -395,6 +405,10 @@ function main() {
local continue_start continue_end
process_parameters $@

+ if [[ $OVERRIDE_GRIMOIRES ]] ; then
+ codex_set_grimoires $OVERRIDE_GRIMOIRES
+ fi
+
codex_does_spell_exist $SPELL || return 1
codex_set_current_spell_by_name $SPELL
load_build_api
diff --git a/usr/share/man/man8/delve.8 b/usr/share/man/man8/delve.8
index 8175001..6ea5c03 100644
--- a/usr/share/man/man8/delve.8
+++ b/usr/share/man/man8/delve.8
@@ -4,7 +4,7 @@ delve \- a tool that allows the running of single spell files
through the
build and install phases of the casting process.
.SH SYNOPSIS
.B delve
-.RB [ \-f ]
+.RB [ \-f ] \ [ \-g \ 'grimoires']
.IR spellname\ SPELL_FILE
.RI [ ...\ SPELL_FILE ]

@@ -14,7 +14,7 @@ build and install phases of the casting process.
.BI delve \ spellname
.R all

-.B delve [\-f] \-c
+.B delve [\-f] [\-g 'grimoires'] \-c
.I start end spellname
.SH DESCRIPTION
.I delve
@@ -80,6 +80,13 @@ failure (internal sorcery functions).
.I start end
.RS
Run all files from the start step to the end step.
+.RE
+\-g, \-\-grimoire [grimoire names ...]
+.RS
+Use only the specified grimoires for this cast.
+.B NOTE:
+If there are any cross-grimoire dependencies on unspecified grimoires they
will not work. The target spell will not be found. To avoid this, specify all
relevant grimoires to the -g parameter in the order you wish them to be
searched.
+.RE
.SH AUTHOR
Written by Donald Johnson.

diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index 1d71bac..197c847 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -84,8 +84,13 @@ function run_build_spell() {
then
invoke_installwatch
fi &&
- delve $SPELL INSTALL &&
- delve $SPELL INSTALL_EXTRAS &&
+ if [[ $OVERRIDE_GRIMOIRES ]]; then
+ delve -g "$OVERRIDE_GRIMOIRES" $SPELL INSTALL &&
+ delve -g "$OVERRIDE_GRIMOIRES" $SPELL INSTALL_EXTRAS
+ else
+ delve $SPELL INSTALL &&
+ delve $SPELL INSTALL_EXTRAS
+ fi &&
run_post_install || return 2
run_transfer &&
devoke_installwatch &&
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 59113af..abb5483 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1246,6 +1246,29 @@ function filename_indicates_compression() {
grep -qE "^.*\.(gz|tgz|bz2|zip|Z|rpm)$" <<< "$1"
}

+#---------------------------------------------------------------------
+## Check that we have all the passed grimoires and use them to
+## override the default selection (all)
+#---------------------------------------------------------------------
+function override_grimoires() {
+ local grimoires=$1
+ local grimoire
+
+ for grimoire in $grimoires; do
+ if ! codex_find_grimoire $grimoire > /dev/null; then
+ error_message "Grimoire $grimoire does not exist!"
+ if query "Do you want to add it?" y; then
+ scribe add $grimoire || exit 13
+ echo
+ else
+ list_remove grimoires $grimoire
+ fi
+ fi
+ done
+ [[ -z $grimoires ]] && message "Using default grimoire selection!\n"
+
+ export OVERRIDE_GRIMOIRES="$grimoires"
+}

#---------------------------------------------------------------------
##
diff --git a/var/lib/sorcery/protected b/var/lib/sorcery/protected
index 24ecff6..c6d5c47 100755
--- a/var/lib/sorcery/protected
+++ b/var/lib/sorcery/protected
@@ -22,6 +22,7 @@
^/bin/basename$
^/bin/md5sum$
^/bin/install$
+^/bin/tr$
^/usr/bin/install$
^/bin/su$
^/sbin/ldconfig$



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (8e61606661900e18649c197a930b6296c7655b16), Jaka Kranjc, 10/10/2009

Archive powered by MHonArc 2.6.24.

Top of Page