Skip to Content.
Sympa Menu

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

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 (e62719f363ffc5c54ac940154fd4295d4c55d067)
  • Date: Mon, 24 Mar 2008 05:23:06 -0500

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

ChangeLog | 6 ++++++
usr/sbin/alter | 2 +-
usr/sbin/cast | 15 +++++++++------
usr/sbin/cleanse | 6 +++---
usr/sbin/confmeld | 2 +-
usr/sbin/delve | 2 +-
usr/sbin/dispel | 2 +-
usr/sbin/invoke | 2 +-
usr/sbin/scribbler | 2 +-
usr/sbin/scribe | 2 +-
usr/sbin/sorcery | 2 +-
usr/sbin/summon | 2 +-
usr/share/man/man8/cast.8 | 3 ++-
13 files changed, 29 insertions(+), 19 deletions(-)

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

cast.8, cast: -B is recursive, so mention it #14371

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

cast, cleanse, alter, summon, scribe, scribbler, ...: changed $0 to
respective name, so sorcery can be debugged with bashdb properly and
added exec to these calls so one process is saved

diff --git a/ChangeLog b/ChangeLog
index 64f7ec7..be8781e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * cast, cleanse, alter, summon, scribe, scribbler, ...: changed $0 to
+ respective name, so sorcery can be debugged with bashdb properly and
+ added exec to these calls so one process is saved
+ * cast.8, cast: -B is recursive, so mention it #14371
+
2008-03-19 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* confmeld.8: fixed title, thanks to wich

diff --git a/usr/sbin/alter b/usr/sbin/alter
index 7ddb739..1d702d7 100755
--- a/usr/sbin/alter
+++ b/usr/sbin/alter
@@ -562,7 +562,7 @@ elif [[ "$1" == -h ]] ||
else
echo "Enter the root password, please." 1>&2
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "alter $PARAMS" root
fi


diff --git a/usr/sbin/cast b/usr/sbin/cast
index d800c57..3459443 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -49,10 +49,10 @@ Optional Parameters:
relevant grimoires to the -g parameter
in the order you wish them to be searched.

--R | --recast-down Recast depended-upon spells, even if they are
- already installed...
--B | --recast-up Recast dependent spells, even if they are
- already installed...
+-R | --recast-down Recursively recast depended-upon spells, even
+ if they are already installed...
+-B | --recast-up Recursively recast dependent spells, even
+ if they are already installed...

-O | --recast-optional [option] If a spell being built has spells which
could optionally depend on it, but those
@@ -858,7 +858,7 @@ elif [ "$UID" -gt 0 ]; then

echo "Enter the root password, please."
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "cast $PARAMS" root

elif [ ${0:0:5} != "/tmp/" ]; then

@@ -873,7 +873,10 @@ elif [ ${0:0:5} != "/tmp/" ]; then
export CHECK_TRIGGERS_FAILURE="$TMP_DIR/check_trigger_failure_list"
lock_file $SAFE_CAST

- cp $0 $SAFE_CAST
+ # $0 can be bashdb, but we want to copy cast
+ smgl_which cast PATH_TO_CAST
+ cp "$PATH_TO_CAST" $SAFE_CAST
+
chmod +x $SAFE_CAST
exec bash $SAFE_CAST "$@"

diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index 4edb388..3e91c3e 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -35,7 +35,7 @@
#--------------------
function usage()
{
- local s=$(basename $0)
+ local s="cleanse"
cat << EOF
Invoke $s with one of the arguments below.

@@ -1047,7 +1047,7 @@ if [ $UID -eq 0 ] ; then
# Make sure root is running this
if [ $# -eq 0 ] ; then
# IF there are no args, assume the full treatment is desired
- exec $0 --packages --delint --logs --prune doit --tablet --sweep --fix
+ exec cleanse --packages --delint --logs --prune doit --tablet --sweep
--fix
fi

mk_tmp_dirs backup /tmp/cleanse
@@ -1071,5 +1071,5 @@ else
message "You must be root to run this command."
message "Switching to root user..."
PARAMS=$(consolidate_params "$@")
- exec su -c "$0 $PARAMS" root
+ exec su -c "cleanse $PARAMS" root
fi
diff --git a/usr/sbin/confmeld b/usr/sbin/confmeld
index 7dc13a6..2364696 100755
--- a/usr/sbin/confmeld
+++ b/usr/sbin/confmeld
@@ -307,7 +307,7 @@ function main()
. /etc/sorcery/config
if [ "$UID" -gt 0 ]; then
echo "Enter the root password, please."
- su -c "$0 $@" root
+ exec su -c "confmeld $@" root
else
STAGED_INSTALL="off"
main "$@"
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 762c08d..9598b9d 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -443,7 +443,7 @@ elif [[ $1 == -h ]] || [[ $1 == --help ]] ; then
help
elif [ "$UID" -gt 0 ]; then
echo "Enter the root password, please."
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "delve $PARAMS" root
else
# Make a nice dir structure to put stuff in, this exits if it fails
mk_tmp_dirs delve
diff --git a/usr/sbin/dispel b/usr/sbin/dispel
index 09b9ced..879c0e7 100755
--- a/usr/sbin/dispel
+++ b/usr/sbin/dispel
@@ -642,7 +642,7 @@ elif [ "$UID" == 0 ]; then
else
echo "Enter the root password, please." 1>&2
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "dispel $PARAMS" root
fi


diff --git a/usr/sbin/invoke b/usr/sbin/invoke
index d8ab130..efc0e3e 100755
--- a/usr/sbin/invoke
+++ b/usr/sbin/invoke
@@ -306,7 +306,7 @@ parse_params() {

update) if [ "$UID" != 0 ]; then
echo "Enter the root password, please."
- su -c "$0 $*" root
+ exec su -c "invoke $@" root
fi
update_menu_index $2
;;
diff --git a/usr/sbin/scribbler b/usr/sbin/scribbler
index 3e80049..130ef5c 100755
--- a/usr/sbin/scribbler
+++ b/usr/sbin/scribbler
@@ -171,7 +171,7 @@ validate_and_parse_args $@
if [ "${UID}" != 0 ]; then
echo "Enter the root password, please:"
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "scribbler $PARAMS" root
fi

main "$@"
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 50a3a84..950bd63 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -774,7 +774,7 @@ elif [[ $1 == index ]] ; then
else
echo "Enter the root password, please." 1>&2
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "scribe $PARAMS" root
fi

#---------------------------------------------------------------------
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 593f4f6..2b05a7a 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -2009,7 +2009,7 @@ else
else
echo "Enter the root password, please."
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "sorcery $PARAMS" root
fi
fi
fi
diff --git a/usr/sbin/summon b/usr/sbin/summon
index 466c397..6a08dbc 100755
--- a/usr/sbin/summon
+++ b/usr/sbin/summon
@@ -249,7 +249,7 @@ elif [[ $1 == -h ]] || [[ $1 == --help ]] ; then
help
else
echo "Enter the root password, please." 1>&2
PARAMS=$(consolidate_params "$@")
- su -c "$0 $PARAMS" root
+ exec su -c "summon $PARAMS" root
fi


diff --git a/usr/share/man/man8/cast.8 b/usr/share/man/man8/cast.8
index 81a55bc..f22343d 100644
--- a/usr/share/man/man8/cast.8
+++ b/usr/share/man/man8/cast.8
@@ -68,7 +68,8 @@ recasts all the spells the given spell(s) depend on
(and the ones they depend on ...).
This might be quite a lot of spells.
.SS "-B, --recast-up"
-recasts all the spells that depend on the given spell(s).
+recasts all the spells that depend on the given spell(s)
+(and the ones they depend on ...).
.SS "-O, --recast-optional [option]"
If a spell being built has spells which could optionally depend on it, but
those
dependencies are disabled, ask to recast the dependee. Option can be one of:
"always",



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (e62719f363ffc5c54ac940154fd4295d4c55d067), Jaka Kranjc, 03/24/2008

Archive powered by MHonArc 2.6.24.

Top of Page