Subject: [SM-Commit] BZR Change 2 to stable sorcery by Andrew Stitt <astitt AT sourcemage.org>
Date: Sun, 30 Apr 2006 11:00:04 -0500
------------------------------------------------------------
revno: 2
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: stable
timestamp: Sun 2006-04-30 08:56:56 -0700
message:
release 1.13.5
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060421155924-a44e76c7ee133a2a
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Fri 2006-04-21 08:59:24 -0700
message:
version++
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060421154027-aefc9cd6c979c9b5
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Fri 2006-04-21 08:40:27 -0700
message:
fix bug 11372 and other summon issues
------------------------------------------------------------
merged: astitt AT sourcemage.org-20060412163703-d06c3feca02f9ddd
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Wed 2006-04-12 09:37:03 -0700
message:
fix bug 10682
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060412162756-6899e6ab09a146d0
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Wed 2006-04-12 09:27:56 -0700
message:
version++
------------------------------------------------------------
merged: astitt AT sourcemage.org-20060412162546-3e805004a6ed72c3
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Wed 2006-04-12 09:25:46 -0700
message:
fix bug 10144
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060410193730-55f582c653ece42a
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Mon 2006-04-10 12:37:30 -0700
message:
version++
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060410193334-4b0619e3bdbac00d
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Mon 2006-04-10 12:33:34 -0700
message:
pull git handlers into test
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060408200601-3155e05d05ab6053
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Sat 2006-04-08 13:06:01 -0700
message:
fix bugs 10855 and 10900
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060407001422-cb93e91012ddc4eb
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Thu 2006-04-06 17:14:22 -0700
message:
version++
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060407000041-631ae9855f4c145e
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: testa
timestamp: Thu 2006-04-06 17:00:41 -0700
message:
fix bug 10869
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060405035046-d24bce5cdeea0d5f
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Tue 2006-04-04 20:50:46 -0700
message:
merge from diverged test
------------------------------------------------------------
merged: astitt AT sourcemage.org-20060405033026-93e3b17b0110af80
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Tue 2006-04-04 20:30:26 -0700
message:
pull in fix for bug 10684
------------------------------------------------------------
merged: astitt AT sourcemage.org-20060405032049-9aa5d6c4609f6ad3
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Tue 2006-04-04 20:20:49 -0700
message:
fix bug 10357
------------------------------------------------------------
merged: astitt AT fawkes.sourcemage.org-20060403010645-513ec999ef95a3ff
committer: astitt <astitt AT fawkes.sourcemage.org>
branch nick: test
timestamp: Sun 2006-04-02 20:06:45 -0500
message:
populate from test
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060405034648-c9e2551ceec3f245
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Tue 2006-04-04 20:46:48 -0700
message:
pull over change for building in bzr
------------------------------------------------------------
merged: afrayedknot@thefrayedknot-20060405034231-2e7c490ce0aecff2
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Tue 2006-04-04 20:42:31 -0700
message:
version++
=== added file 'var/lib/sorcery/modules/dl_handlers/dl_git'
--- /dev/null
+++ var/lib/sorcery/modules/dl_handlers/dl_git
@@ -0,0 +1,80 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2004 by the Source Mage Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#---------------------------------------------------------------------
+
+
+#---------------------------------------------------------------------
+##=item dl_get_git <url>
+##
+## Fetch the specified git url.
+##
+## This handler only supports tree downloads.
+##
+#---------------------------------------------------------------------
+function dl_git_get () {
+ dl_command_check git || return 254
+
+ local target=$1
+ local url_list=$2
+ local hints=$3
+ local dl_target=$4
+ local dl_type=$5
+ local url rc=0
+
+ [[ $target ]] &&
+ dl_connect || return 255
+
+ for url in $url_list; do
+ local URL GIT_ROOT GIT_DIRECTORY GIT_TAG
+ url_crack "$url" "$hints"
+ if test -d $GIT_DIRECTORY; then
+ message "${MESSAGE_COLOR}Running git pull...${DEFAULT_COLOR}"
+ echo git pull $GIT_ROOT
+ ( cd $GIT_DIRECTORY &&
+ git pull $GIT_ROOT )
+ rc=$?
+ eval "$dl_target=\"$GIT_DIRECTORY\""
+ else
+ message "${MESSAGE_COLOR}Running git clone...${DEFAULT_COLOR}"
+ echo git clone $GIT_ROOT $GIT_DIRECTORY
+ git clone $GIT_ROOT $GIT_DIRECTORY
+ rc=$?
+ eval "$dl_target=\"$GIT_DIRECTORY\""
+ fi
+ [[ $rc == 0 ]] && break
+ done
+ dl_disconnect
+
+ eval "$dl_type=\"tree\""
+ return $rc
+}
+
+#---------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---------------------------------------------------------------------
=== added file 'var/lib/sorcery/modules/url_handlers/url_git'
--- /dev/null
+++ var/lib/sorcery/modules/url_handlers/url_git
@@ -0,0 +1,122 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Url handler functions for downloading git urls
+##
+##=head1 DESCRIPTION
+##
+## This file contains functions for downloading and verifying
+## git urls. This file uses the "git" program.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2002 by the Source Mage Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#---------------------------------------------------------------------
+
+#---------------------------------------------------------------------
+##=item url_git_crack <url>
+##
+## Parse the specified git url.
+##
+## @Global URL
+## @Global GIT_ROOT
+## @Global GIT_DIRECTORY
+## @Global GIT_TAG
+##
+#---------------------------------------------------------------------
+function url_git_crack() {
+
+ URL=`url_strip_prefix "$1" git`
+ GIT_ROOT=`echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#"`
+ GIT_ROOT=git://$GIT_ROOT
+ local GIT_DIRECTORY_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"`
+ GIT_DIRECTORY=`echo $GIT_DIRECTORY_TAG | cut -d : -f2`
+ local GIT_TAGNAME=`echo $GIT_DIRECTORY_TAG | cut -d : -f3`
+ GIT_TAG=${SVN_TAGNAME:=master}
+
+}
+
+#---------------------------------------------------------------------
+##=item url_git_bucketize <url>
+##
+## Verifies the specified git url. Returns true if the url exists
+## OR if the url is an empty string.
+##
+#---------------------------------------------------------------------
+function url_git_bucketize() {
+ echo git
+}
+
+#---------------------------------------------------------------------
+##=item url_git_verify <url>
+##
+## Verifies the specified git url. Returns true if the url exists
+## OR if the url is an empty string.
+##
+#---------------------------------------------------------------------
+function url_git_verify() {
+ local URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
+ url_git_crack $1
+ for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+ if ! [[ ${!item} ]] ; then
+ return 1
+ fi
+ done
+}
+
+#---------------------------------------------------------------------
+##=item url_<prefix>_hostname <url>
+##
+## Gets the hostname out of the url
+#---------------------------------------------------------------------
+function url_git_hostname() {
+ echo $1|sed 's:^.*//\([^/]*\).*$:\1:'
+}
+
+#---------------------------------------------------------------------
+##=item url_git_netselect <url>
+##
+## Gets a netselect type output for the url
+##
+#---------------------------------------------------------------------
+function url_git_netselect() {
+ local tmp_hostname url_speed each
+
+ for each in "$@" ; do
+ tmp_hostname=$(url_git_hostname $each)
+ # since we had to pull the url apart to give netselect
+ # something it can understand we'll just pretend like
+ # multiple A records wont exist for this host...
+ url_speed=$(netselect -s 1 $tmp_hostname 2>/dev/null|awk '{print $1}')
+ [[ -n $url_speed ]] && echo "$url_speed $each"
+ done
+}
+
+
+#---------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---------------------------------------------------------------------
=== modified file 'ChangeLog'
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,90 @@
+2006-04-30 Andrew Stitt <astitt AT sourcemage.org>
+ * 1.13.5 Release
+
+2006-04-21 Andrew Stitt <astitt AT sourcemage.org>
+ * libsummon: fix bug 11372, bad spells can make us unlock the wrong
+ resource, causing subsequent summons to hang. Also fix return code
+ propagation.
+
+2006-04-12 Andrew Stitt <astitt AT sourcemage.org>
+ * gaze: fix bug 10144, fix viewing of install queue, patch from
+ Jaka Kranjc
+ * libdispel: print message if dispel fails, bug 10682
+
+2006-04-08 Andrew Stitt <astitt AT sourcemage.org>
+ * libdepends: add default_* functions for dependency resolution
+ phase, bug 10900.
+ * libdispel: add default_* function for dispel phase
+ * libdispel: add persistent_load/persistent_save calls around
+ *_REMOVE functions, bug 10855.
+ * libapi: add entry points for default_* for depends resolution
+ and dispel
+
+2006-04-07 Andrew Stitt <astitt AT sourcemage.org>
+ * libtablet: allow special keyword 'all' to unconditionally
+ update a file in the tablet, bug 10869
+
+2006-04-04 Andrew Stitt <astitt AT sourcemage.org>
+ * build: exclude .bzr metadata
+
+2006-04-04 Andrew Stitt <astitt AT sourcemage.org>
+ * libunpack: move verification code out of unpack_file and into
+ new verify_file function. Removed un-used inner loop.
+ * libapi: add entry point for verify_file. Fixes bug 10684.
+
+2006-04-04 Andrew Stitt <astitt AT sourcemage.org>
+ * libmisc: fix bug 10357, add extra check for a file incase theres
+ a directory named make.
+
+2006-03-25 Andrew Stitt <astitt AT sourcemage.org>
+ * libunpack: check for spell or actual command before assuming
+ verification cannot be done.
+
+2006-03-25 Andrew Stitt <astitt AT sourcemage.org>
+ * libsorcery: remove LC_ALL hack
+ * cast: put slightly safer LC_ALL hack in cast around the build
+ phase. This fixes bug 10546, see also bug 2910.
+ * config: add -f to less arguments, less is never invoked on binary
data
+
+2006-03-24 Andrew Stitt <astitt AT sourcemage.org>
+ * libdispel: explicitly return 0 after removing state files
+
+2006-03-21 Andrew Stitt <astitt AT sourcemage.org>
+ * libtablet: Fix repair failure message to hint at cleanse --tablet
+ add a special variable for tablet location in tablet_set_spell
+ * libdispel: fix long outstanding bug 8826, blow away the tablet
+ directory, un-attributed repair files can cause the normal dispel
+ safe removal process from succeeding.
+
+2006-03-20 Andrew Stitt <astitt AT sourcemage.org>
+ * sorcery: fix bug 10693, correct dialog message, patch from
+ Jeremy Blosser.
+
+2006-03-20 Andrew Stitt <astitt AT sourcemage.org>
+ * dispel: fix issues with failure codes in dispel+depends
+
+2006-03-20 Andrew Stitt <astitt AT sourcemage.org>
+ * build_api/common, cast: move pop_install_queue out of cast
+ and into run_spell_success, bug 10719
+
+2006-03-20 Andrew Stitt <astitt AT sourcemage.org>
+ * libgrimoire: Add a sanity check to installed_version, bug 10705
+ split actual installed_version into a subroutine for optimization
+ purposes.
+ * cast, cleanse, libdispel, libresurrect: use
private_installed_version
+ where its known the spell is installed and the additional sanity
+ check is not needed.
+ * build_api/common: Add some extra quotes
+
+2006-03-14 Andrew Stitt <astitt AT sourcemage.org>
+ * cast, libsecurity, libmisc: use DEFAULT_COLOR not DEFAULT
+ (which is initially also a color but a poor variable name)
+ * libmedia: eliminate DEFAULT as a color, just call it
+ DEFAULT_COLOR
+
+2006-03-12 Andrew Stitt <astitt AT sourcemage.org>
+ * config/url: add fallback mirror from David Kowis
+
2006-03-12 Andrew Stitt <astitt AT sourcemage.org>
* 1.13.4 Release
+ # HACK for bug 2910 and 10546
+ local saved_lc_all=$LC_ALL
+ export LC_ALL=C
+
# this will run through the whole build process
run_build_spell
rc=$?
+ # HACK for bug 2910 and 10546
+ if [[ -n ${saved_lc_all} ]] ; then
+ export LC_ALL=$saved_lc_all
+ else
+ unset LC_ALL
+ fi
+
# This is the home for anything and everything we do
# when a phase4 succeeds or fails, no more spreading things out
# into multiple functions.
cd /
-
- pop_install_queue "$SPELL"
# hooks back out to the build_api to do whatever needs to be done
if [ $rc == 0 ] ; then
@@ -553,8 +562,7 @@
# this is a hacky way to tell what version we're updating from
# if any, we can use it to find md5 logs for installing config type
# files, it mostly is here for libresurrect.real_install_config_file
- local OLD_SPELL_VERSION
- spell_ok $SPELL && OLD_SPELL_VERSION=$(installed_version $SPELL)
+ local OLD_SPELL_VERSION=$(installed_version $SPELL)
local rc
if [[ "$do_resurrect" == "yes" ]] ; then
@@ -811,7 +819,7 @@
export SCREEN_OVERRIDE=no
message "${MESSAGE_COLOR}Although screen mode is enabled, you already
seem to be in a another"
message "screen session. Screen-in-screen is disabled."
- message "Continuing with screen mode off.${DEFAULT}"
+ message "Continuing with screen mode off.${DEFAULT_COLOR}"
fi
# Disable screen mode if the appropriate env var is set
=== modified file 'usr/sbin/cleanse'
--- usr/sbin/cleanse
+++ usr/sbin/cleanse
@@ -642,7 +642,7 @@
else
message "Checking ${SPELL_COLOR}${SPELL}${DEFAULT_COLOR} ($2 of $3)"
fi
- local VERSION=$(installed_version $SPELL)
+ local VERSION=$(private_installed_version $SPELL)
cleanse_fix_find_check $SPELL $VERSION &&
cleanse_fix_ldd_check $SPELL $VERSION &&
@@ -733,7 +733,7 @@
let size++
done
for SPELL in $* ; do
- I_LOG=$INSTALL_LOGS/$SPELL-$(installed_version $SPELL)
+ I_LOG=$INSTALL_LOGS/$SPELL-$(private_installed_version $SPELL)
hash_put ldd_hash $SPELL "$(grep '\.so$'
$I_LOG|get_dirnames|sort|uniq|tr '\n' :)"
progress_bar $count $size 50
let count++
@@ -946,7 +946,7 @@
# this actually isnt a very good assumption but works enough
# of the time
each_spell=$(basename $each|awk -F- '{for (i=1;i<NF-1;i++)
{printf "%s-",$i}printf "%s\n",$i}')
- each_version=$(installed_version $each_spell)
+ each_version=$(private_installed_version $each_spell)
[[ $each_version ]] &&
[[ $MD5SUM_LOGS/${each_spell}-${each_version} == $each ]] &&
echo $each
#---------------------------------------------------------------------
@@ -445,10 +445,13 @@
#---------------------------------------------------------------------
function dispel_depends_engine() {
- local CURR_SPELLS=$1
- for SPELL in $SPELLS; do
- dispel_spell_wrapper $SPELL ||
- DISPEL_EXIT_STATUS=${DISPEL_EXIT_STATUS:-$?}
+ local CURR_SPELLS SPELL
+ for SPELL in $1; do
+ if dispel_spell_wrapper $SPELL ; then
+ list_add CURR_SPELLS $SPELL
+ else
+ DISPEL_EXIT_STATUS=${DISPEL_EXIT_STATUS:-$?}
+ fi
done
@@ -606,9 +609,11 @@
done
else
for SPELL in $SPELLS; do
- dispel_spell_wrapper $SPELL
+ dispel_spell_wrapper $SPELL ||
+ DISPEL_EXIT_STATUS=${DISPEL_EXIT_STATUS:-$?}
done
fi
+ return $DISPEL_EXIT_STATUS
}
- install-queue) display $INSTALL_QUEUE "Install queue does not exist" ;;
+ install-queue) if [[ -s $INSTALL_QUEUE ]]; then
+ $PAGER $INSTALL_QUEUE
+ else
+ message "Install queue does not exist or is empty"
+ fi
+ ;;
remove-queue) display $REMOVE_QUEUE "Remove queue does not exist" ;;
=== modified file 'usr/sbin/scribe'
--- usr/sbin/scribe
+++ usr/sbin/scribe
@@ -210,7 +210,7 @@
if [ -z "$from" ]; then
#from is empty - use the default
prefix=$(url_get_prefix $CODEX_URL)
- if list_find "rsync svn cvs smgl_tla dir" $prefix ; then
+ if list_find "rsync svn cvs smgl_tla dir git" $prefix ; then
grim_target=$grim_name
else
grim_target="$grim_name.tar.bz2"
# update depends info
debug "build_api/common" "Merging depends info"
@@ -216,7 +217,7 @@
# none of the old values are valid, only the new, uncommitted values are
remove_depends_status $t_DEPENDS_STATUS $SPELL
local spell_depends=$(hash_get uncommitted_hash $SPELL)
- if [ -e $spell_depends ] ; then
+ if [ -e "$spell_depends" ] ; then
cat $spell_depends >> $t_DEPENDS_STATUS
fi
lock_commit_transaction $DEPENDS_STATUS
@@ -298,7 +299,7 @@
# put the answers somewhere where they can still be used later
mkdir -p $ABANDONED_DEPENDS
local spell_depends=$(hash_get uncommitted_hash $SPELL)
- [ -e $spell_depends ] && mv $spell_depends $ABANDONED_DEPENDS/$SPELL
+ [ -e "$spell_depends" ] && mv $spell_depends $ABANDONED_DEPENDS/$SPELL
# This may have been locked if there was a failure during the install
unlock_resources "libgrimoire" "install"
#---------------------------------------------------------------------
## @Type API
+## @param SOURCE suffix
+## @See <@function var.lib.sorcery.modules.libunpack.html,real_verify_file>
for more details.
+##
+## verify_file takes the SOURCE suffix and verifies the file without
+## unpacking it. It does not work with the old 'MD5[0]=...' style.
+## Only with the "new" SOURCEn_(GPG|HASH|IGNORE) style.
+##
+#---------------------------------------------------------------------
+function verify_file () {
+ debug "libapi" "verify_file - $*"
+ real_verify_file "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
## @param Target of the trigger
## @param Action to execute
## @See <@function var.lib.sorcery.modules.libdepends.html,real_up_triggers>
for more details.
rm -f $REAPER_FILES $REAPER_DIRS $REAPER_SYMS
+
+ # bug 8826, if we dont explicitly remove the directory it can form
+ # a corrupt zombified tablet page
+ [[ "$TABLET_PAGE" ]] && test -d "$TABLET_PAGE" && rm -rf "$TABLET_PAGE"
+ return 0
}
- VERSION=`installed_version $SPELL`
+ VERSION=`private_installed_version $SPELL`
INST_LOG=$INSTALL_LOGS/$SPELL-$VERSION
MD5_LOG=$MD5SUM_LOGS/$SPELL-$VERSION
if [[ $SCRIPT_DIRECTORY ]] ; then
@@ -263,28 +268,45 @@
## Run the PRE_REMOVE script if it exists
#-----
function pre_remove() {
- if [[ $SCRIPT_DIRECTORY ]] && [ -x $SCRIPT_DIRECTORY/PRE_REMOVE ]; then
- unset LD_PRELOAD
- . $SCRIPT_DIRECTORY/PRE_REMOVE
- fi
+ local rc=0
+ if [[ $SCRIPT_DIRECTORY ]] ; then
+ persistent_load &&
+ if test -x $SCRIPT_DIRECTORY/PRE_REMOVE ; then
+ . $SCRIPT_DIRECTORY/PRE_REMOVE
+ else
+ default_pre_remove
+ fi
+ rc=$?
+ persistent_save
+ fi
+ return $rc
+}
+
+function real_default_pre_remove() {
+ :
}
#-----
## Run the POST_REMOVE script if it exists.
#-----
function post_remove() {
- # what is the point of this?
- LD_PRELOAD_OLD="$LD_PRELOAD"
- unset LD_PRELOAD
-
- export LD_PRELOAD="$LD_PRELOAD_OLD"
-
- if [[ $SCRIPT_DIRECTORY ]] && [ -x $SCRIPT_DIRECTORY/POST_REMOVE ]
- then . $SCRIPT_DIRECTORY/POST_REMOVE
- fi
-
-}
-
+ local rc=0
+ if [[ $SCRIPT_DIRECTORY ]] ; then
+ persistent_load &&
+ if test -x $SCRIPT_DIRECTORY/POST_REMOVE ; then
+ . $SCRIPT_DIRECTORY/POST_REMOVE
+ else
+ default_post_remove
+ fi
+ rc=$?
+ persistent_save
+ fi
+ return $rc
+}
+
+function real_default_post_remove() {
+ :
+}
=== modified file 'var/lib/sorcery/modules/libgrimoire'
--- var/lib/sorcery/modules/libgrimoire
+++ var/lib/sorcery/modules/libgrimoire
@@ -174,17 +174,26 @@
#---------------------------------------------------------------------
## @Type API
## @param spell
+##
## Returns the current version of the given spell
##
#---------------------------------------------------------------------
function real_installed_version() {
-
- local spell="$1"
-
- grep "^$spell:" $SPELL_STATUS | cut -d : -f4 | head -n 1
-
-}
-
+ spell_ok $1 || return
+ private_installed_version "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
+## @param spell
+## Returns the current version of the given spell
+## Doesnt do sanity check for spell_ok, used internally for speed.
+## Behavior is undefined is spell is not installed.
+##
+#---------------------------------------------------------------------
+function private_installed_version() {
+ grep "^$1:" $SPELL_STATUS | cut -d : -f4 | head -n 1
+}
# already have a reasonable value...
[ "$ANSWER" == "y" ] || [ "$ANSWER" == "n" ] && return 0
@@ -884,7 +884,7 @@
list_find "$ANSWER" $5 && key=n
if [[ "$key" ]]; then
- echo -e "[[ ${QUERY_COLOR}$2${DEFAULT} ->
${QUERY_COLOR}$key${DEFAULT} ]]"
+ echo -e "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} ->
${QUERY_COLOR}$key${DEFAULT_COLOR} ]]"
return 0
fi
fi
@@ -922,7 +922,7 @@
if config_get_option "$1" ANSWER; then
# option allready answered in config
- echo -e "[[ ${QUERY_COLOR}$2${DEFAULT} ->
'${QUERY_COLOR}$ANSWER${DEFAULT}' ]]"
+ echo -e "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} ->
'${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
else
local default
config_get_last_option "$1" default
@@ -962,7 +962,7 @@
echo "!!!! stored option '$ANSWER' in config is not in list of
provided options !!!!"
echo "!!!! WARNING !!!!"
)
- echo -e "[[ ${QUERY_COLOR}${QUESTION}${DEFAULT} ->
'${QUERY_COLOR}$ANSWER${DEFAULT}' ]]"
+ echo -e "[[ ${QUERY_COLOR}${QUESTION}${DEFAULT_COLOR} ->
'${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
else
# if there was an answer before, find it
local default default_num=0 foo
@@ -1128,7 +1128,7 @@
local target=$1 location
local BREAK
function smgl_which_sub() {
- if test -x "$1/$target" ; then
+ if test -f "$1/$target" -a -x "$1/$target" ; then
echo "$1/$target"
BREAK=yes
fi
=== modified file 'var/lib/sorcery/modules/libresurrect'
--- var/lib/sorcery/modules/libresurrect
+++ var/lib/sorcery/modules/libresurrect
@@ -139,7 +139,7 @@
# note if installed is not yes, none of this should be assumed to exist
# welcome to the first ring of pathname adjustment hell
- local OLD_SPELL_VERSION=$(installed_version $SPELL)
+ local OLD_SPELL_VERSION=$(private_installed_version $SPELL)
local OLD_INSTALL_LOG=${INSTALL_LOGS}/$SPELL-$OLD_SPELL_VERSION
local OLD_MD5_LOG=${MD5SUM_LOGS}/$SPELL-$OLD_SPELL_VERSION
=== modified file 'var/lib/sorcery/modules/libsecurity'
--- var/lib/sorcery/modules/libsecurity
+++ var/lib/sorcery/modules/libsecurity
@@ -40,9 +40,9 @@
SECTION=`echo $i | sed -e 's/\/[^\/]*\/DETAILS//' -e 's/\/.*\///'`
if test "$SECTION" == "$SPELL" || test "$SECTION" == "DETAILS"
then
- echo -en "${SPELL_COLOR}$SPELL${DEFAULT} "
+ echo -en "${SPELL_COLOR}$SPELL${DEFAULT_COLOR} "
else
- echo -en "$GRIMOIRE: $SECTION: ${SPELL_COLOR}$SPELL${DEFAULT} "
+ echo -en "$GRIMOIRE: $SECTION: ${SPELL_COLOR}$SPELL${DEFAULT_COLOR} "
fi
REALSOURCE=
@@ -96,14 +96,14 @@
fi
if [ -z "$(find $SOURCE_CACHE/$SOURCE -maxdepth 1 -mtime +3 2>
/dev/null)" ]
then
- AGE="${GREEN}NEW${DEFAULT}"
- else
- AGE="${YELLOW}${BOLD}OLD${DEFAULT}"
- fi
- SRCDATA="SOURCE$SOURCEnum L:'${LICENSE[$MD5num]}' $SOURCE${DEFAULT} $AGE"
+ AGE="${GREEN}NEW${DEFAULT_COLOR}"
+ else
+ AGE="${YELLOW}${BOLD}OLD${DEFAULT_COLOR}"
+ fi
+ SRCDATA="SOURCE$SOURCEnum L:'${LICENSE[$MD5num]}'
$SOURCE${DEFAULT_COLOR} $AGE"
if test "$fMD5" == "$tMD5"
then
- echo -en "${GREEN}VERIFIED $SRCDATA${DEFAULT}"
+ echo -en "${GREEN}VERIFIED $SRCDATA${DEFAULT_COLOR}"
else
if test "$fMD5" == "$EMPTYMD5" || test "$fMD5" == ""
then
@@ -145,12 +145,12 @@
MATCHED="`grep "$tMD5" "$PRECACHEDF" | cut -c60- | head -n 1`"
if test -n "`echo "$MATCHED" | fgrep "$SOURCE"`"
then
- echo -en "${RED}${BOLD}MODIFIED $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT} MATCHES $MATCHED"
+ echo -en "${RED}${BOLD}MODIFIED $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT_COLOR} MATCHES $MATCHED"
else
- echo -en "${RED}DIFFERENT $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT} MATCHES $MATCHED"
+ echo -en "${RED}DIFFERENT $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT_COLOR} MATCHES $MATCHED"
fi
else
- echo -en "${RED}${BOLD}INCORRECT $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT}"
+ echo -en "${RED}${BOLD}INCORRECT $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT_COLOR}"
fi
fi
fi
@@ -216,7 +216,7 @@
fi
fi
fi
- echo -en "${DEFAULT}"
+ echo -en "${DEFAULT_COLOR}"
}
=== modified file 'var/lib/sorcery/modules/libsorcery'
--- var/lib/sorcery/modules/libsorcery
+++ var/lib/sorcery/modules/libsorcery
@@ -651,7 +651,7 @@
function optimize() {
debug "libsorcery" "In optimize()"
- unset CFLAGS CXXFLAGS LDFLAGS LC_ALL
+ unset CFLAGS CXXFLAGS LDFLAGS
unset COMBRELOC FAST PRELINK RISKY SMALL SPEEDY STRIP TINY
# if user specified --no-opts then use only the args from the command line
@@ -709,7 +709,6 @@
export CXXFLAGS=$(echo $CFLAGS $CUSTOM_CXXFLAGS $OVERRIDE_CXXFLAGS)
export LDFLAGS=$(echo $LDFLAGS $CUSTOM_LDFLAGS $OVERRIDE_LDLAGS)
fi
- export LC_ALL="C"
}
=== modified file 'var/lib/sorcery/modules/libsummon' (properties changed)
--- var/lib/sorcery/modules/libsummon
+++ var/lib/sorcery/modules/libsummon
@@ -49,7 +49,6 @@
persistent_save
# save the rc, then unlock
rc=$?
- unlock_resources "summon" "${SPELL}"
if [[ $rc == 0 ]]; then
activity_log "summon" "$SPELL" "$VERSION" "success"
@@ -59,10 +58,10 @@
# this actually only returns from the subshell, not the function
return $rc
- ) &&
- popd &>/dev/null
+ ) && popd &>/dev/null
+ rc=$?
rm -rf $dl_dir
- rc=$?
+ unlock_resources "summon" "${SPELL}"
fi
return $rc
}
@@ -382,7 +381,7 @@
local _guess_type
# hard-coded list of url prefixes that generally download trees
- local tree_prefixes="cvs dir rsync smgl_tla svn"
+ local tree_prefixes="cvs dir rsync smgl_tla svn git"
local prefix=$(url_get_prefix $url_list)
if ! list_find "$hints" file &&
list_find "$hints" tree || list_find "$tree_prefixes" "$prefix" ; then
- if ! spell_ok "$1" ; then
+ local x
+ if ! spell_ok "$1" && ! smgl_which $2 x &> /dev/null; then
query "This spell has an option to check its integrity via spell "\
-"${SPELL_COLOR}${1}${QUERY_COLOR} for $2, you might consider casting it. "\
+"${SPELL_COLOR}${1}${QUERY_COLOR} with the $2 command for $3, you might
consider installing it. "\
"Abort?" n &&
return 1 ||
return 200
@@ -372,7 +391,7 @@