Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] BZR Change 2 to stable sorcery by Andrew Stitt <astitt@sourcemage.org>

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: scm AT mail.sourcemage.org
  • To: sm-commit AT lists.ibiblio.org
  • 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


=== modified file 'build'
--- build
+++ build
@@ -1,7 +1,7 @@
#!/bin/bash

function build__find_non_volatile() {
- find "$@" -follow -not -type d -and -not -path '*CVS*' -and -not -name
'.#*' -and -not -name '*~' -and -not -path '*.svn*' -and -not -path
'*.arch-id*' -and -not -path '*{arch}*'
+ find "$@" -follow -not -type d -and -not -path '*CVS*' -and -not -name
'.#*' -and -not -name '*~' -and -not -path '*.svn*' -and -not -path
'*.arch-id*' -and -not -path '*{arch}*' -and -not -path '*.bzr*'
}

branch_dir=$(basename $(pwd))

=== modified file 'etc/sorcery/config'
--- etc/sorcery/config
+++ etc/sorcery/config
@@ -51,7 +51,7 @@
# -X: dont do screen init and deinit, gaze install
# of a small spell is effectively useless otherwise as
the
# screen is cleared afterwards.
- PAGER=${PAGER:=less -R -E -X}
+ PAGER=${PAGER:=less -R -E -X -f}
FILEPROG=${FILEPROG:=file}
DIALOGPROG=${DIALOGPROG:=dialog}


=== modified file 'etc/sorcery/mirrors/SOURCEFORGE' (properties changed)
=== modified file 'etc/sorcery/url'
--- etc/sorcery/url
+++ etc/sorcery/url
@@ -10,10 +10,11 @@
#
# Set FURLNUM to nr. of fallback urls.
#
- FURLNUM=3
+ FURLNUM=4
FALLBACK_URL_MIRROR[0]=http://smgl.positivism.org
FALLBACK_URL_MIRROR[1]=ftp://thefrayedknot.armory.com/sorcery
FALLBACK_URL_MIRROR[2]=http://download.sourcemage.org/mirror
+FALLBACK_URL_MIRROR[3]=http://shlrm.org/sourcemage

# specify default fallback url.
LEAPFORWARD_URL=${LEAPFORWARD_URL:=""}

=== modified file 'etc/sorcery/version'
--- etc/sorcery/version
+++ etc/sorcery/version
@@ -1,1 +1,1 @@
-1.13.4
+1.13.5

=== modified file 'usr/sbin/cast'
--- usr/sbin/cast
+++ usr/sbin/cast
@@ -244,17 +244,26 @@
test -e $spell_depends &&
OPTS="$OPTS $(get_depends_options $spell_depends $SPELL)"

+ # 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

=== modified file 'usr/sbin/dispel'
--- usr/sbin/dispel
+++ usr/sbin/dispel
@@ -257,8 +257,8 @@
## has already been dispelled.
#---------------------------------------------------------------------
function dispel_spell_wrapper() {
+ dispel_spell $1 &&
hash_put ALL_DISPELS $1 yes
- dispel_spell $1
}

#---------------------------------------------------------------------
@@ -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
}

. /etc/sorcery/config

=== modified file 'usr/sbin/gaze'
--- usr/sbin/gaze
+++ usr/sbin/gaze
@@ -1735,7 +1735,12 @@

pam) find_pam_aware ;;

- 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"

=== modified file 'usr/sbin/sorcery'
--- usr/sbin/sorcery
+++ usr/sbin/sorcery
@@ -162,7 +162,8 @@
remove_config $LOCAL_CONFIG "$MIRROR" &&
modify_config $LOCAL_URL_CONFIG "$MIRROR" "$MIRROR_URL" &&

- eval $DIALOG '--msgbox "$MIRROR=$MIRROR_URL saved in $LOCAL_CONFIG"
0 0'
+ eval $DIALOG '--msgbox \
+ "$MIRROR=$MIRROR_URL saved in $LOCAL_URL_CONFIG" 0 0'

fi


=== modified file 'usr/share/man/man1/gaze.1' (properties changed)
=== modified file 'usr/share/man/man8/cast.8' (properties changed)
=== modified file 'usr/share/man/man8/scribe.8' (properties changed)
=== modified file 'usr/share/man/man8/sorcery.8' (properties changed)
=== modified file 'var/lib/sorcery/archspecs/amd64/x86_32' (properties
changed)
=== modified file 'var/lib/sorcery/archspecs/amd64/x86_64' (properties
changed)
=== modified file 'var/lib/sorcery/modules/build_api/common'
--- var/lib/sorcery/modules/build_api/common
+++ var/lib/sorcery/modules/build_api/common
@@ -209,6 +209,7 @@
activity_log "cast" "$SPELL" "$VERSION" "success"
add_spell $SPELL installed $VERSION
echo $SPELL >> $SUCCESS_LIST
+ pop_install_queue "$SPELL"

# 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"

=== modified file 'var/lib/sorcery/modules/libapi' (properties changed)
--- var/lib/sorcery/modules/libapi
+++ var/lib/sorcery/modules/libapi
@@ -25,12 +25,17 @@
# config_query_string (libmisc)
# conflicts (libgrimoire)
# default_build (build_api/...)
+# default_configure (libdepends)
+# default_depends (libdepends)
# default_download (libsummon)
# default_install (build_api/api2) (BUILD_API==2 only)
# default_post_build (build_api/api1) (BUILD_API==1 only)
# default_post_install (build_api/api2) (BUILD_API==2 only)
+# default_post_remove (libdispel)
# default_pre_build (build_api/common)
# default_pre_install (build_api/api2) (BUILD_API==2 only)
+# default_pre_remove (libdispel)
+# default_prepare (libdepends)
# depends (libdepends)
# devoke_installwatch (libtrack)
# download_src (libsummon)
@@ -74,6 +79,7 @@
# unpack (libunpack) (deprecated)
# unpack_file (libunpack)
# unpack_file_simple (libunpack)
+# verify_file (libunpack)
#
# Read-only variable that might be of use to a spell:
# SOURCE_CACHE, OPTS, BUILD HOST, INSTALL_ROOT
@@ -277,6 +283,30 @@

#---------------------------------------------------------------------
## @Type API
+## @See <@function
var.lib.sorcery.modules.libdepends.html,real_default_configure> for more
details.
+##
+## Default configure code, just no-op for now.
+##
+#---------------------------------------------------------------------
+function default_configure() {
+ debug "libapi" "$FUNCNAME - $*"
+ real_default_configure "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
+## @See <@function
var.lib.sorcery.modules.libdepends.html,real_default_depends> for more
details.
+##
+## Default depends code, just no-op for now.
+##
+#---------------------------------------------------------------------
+function default_depends() {
+ debug "libapi" "$FUNCNAME - $*"
+ real_default_depends "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
## @See <@function
var.lib.sorcery.modules.libsummon.html,real_default_download> for more
details.
##
## Default download code, downloads each SOURCE[[:digit:]]*
@@ -333,6 +363,18 @@

#---------------------------------------------------------------------
## @Type API
+## @See <@function
var.lib.sorcery.modules.libdispel.html,real_default_post_remove> for more
details.
+##
+## Default post_remove code, just no-op for now.
+##
+#---------------------------------------------------------------------
+function default_post_remove() {
+ debug "libapi" "$FUNCNAME - $*"
+ real_default_post_remove "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
## @See <@function
var.lib.sorcery.modules.libgrimoire.html,real_default_pre_build> for more
details.
## Creates the source directory and unpacks the source package into it.
## Used if no PRE_BUILD script is found for a spell.
@@ -356,6 +398,30 @@
function default_pre_install () {
debug "libapi" "default_pre_install - $*"
real_default_pre_install "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
+## @See <@function
var.lib.sorcery.modules.libdispel.html,real_default_pre_remove> for more
details.
+##
+## Default pre_remove code, just no-op for now.
+##
+#---------------------------------------------------------------------
+function default_pre_remove() {
+ debug "libapi" "$FUNCNAME - $*"
+ real_default_pre_remove "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
+## @See <@function
var.lib.sorcery.modules.libdepends.html,real_default_prepare> for more
details.
+##
+## Default prepare code, just no-op for now.
+##
+#---------------------------------------------------------------------
+function default_prepare() {
+ debug "libapi" "$FUNCNAME - $*"
+ real_default_prepare "$@"
}

#---------------------------------------------------------------------
@@ -1016,6 +1082,21 @@

#---------------------------------------------------------------------
## @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.

=== modified file 'var/lib/sorcery/modules/libdepends'
--- var/lib/sorcery/modules/libdepends
+++ var/lib/sorcery/modules/libdepends
@@ -93,13 +93,19 @@
local GRIMOIRE=${SECTION_DIRECTORY%/*}

local PROTECT_SORCERY=yes
+ persistent_load &&
if [ -x $SCRIPT_DIRECTORY/PREPARE ]; then
- # we need &&'s to preserve the proper return code (persistant_save
- # will probably succeed even if PREPARE fails)
- persistent_load &&
- . $SCRIPT_DIRECTORY/PREPARE &&
- persistent_save
- fi
+ . $SCRIPT_DIRECTORY/PREPARE
+ else
+ default_prepare
+ fi
+ rc=$?
+ persistent_save
+ return $rc
+}
+
+function real_default_prepare() {
+ :
}

#---------------------------------------------------------------------
@@ -129,17 +135,22 @@
local SPELL=$1
debug "cast" "run_configure() - SCRIPT_DIRECTORY = $SCRIPT_DIRECTORY"

-
local PROTECT_SORCERY=yes
+ persistent_load &&
if [ -x $SCRIPT_DIRECTORY/CONFIGURE ]; then
message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
"${CHECK_COLOR}running configuration...${DEFAULT_COLOR}"
- # we need &&'s to preserve the proper return code (persistant_save
- # will probably succeed even if PREPARE fails)
- persistent_load &&
- . $SCRIPT_DIRECTORY/CONFIGURE &&
- persistent_save
- fi
+ . $SCRIPT_DIRECTORY/CONFIGURE
+ else
+ default_configure
+ fi
+ rc=$?
+ persistent_save
+ return $rc
+}
+
+function real_default_configure() {
+ :
}

#---------------------------------------------------------------------
@@ -152,16 +163,21 @@
debug "cast" "run_depends() - SCRIPT_DIRECTORY = $SCRIPT_DIRECTORY"

local PROTECT_SORCERY=yes
+ persistent_load &&
if [ -x $SCRIPT_DIRECTORY/DEPENDS ]; then
message "${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}" \
"${CHECK_COLOR}checking dependencies...${DEFAULT_COLOR}"
-
- # we need &&'s to preserve the proper return code (persistant_save
- # will probably succeed even if PREPARE fails)
- persistent_load &&
- . $SCRIPT_DIRECTORY/DEPENDS &&
- persistent_save
- fi
+ . $SCRIPT_DIRECTORY/DEPENDS
+ else
+ default_depends
+ fi
+ rc=$?
+ persistent_save
+ return $rc
+}
+
+function real_default_depends() {
+ :
}

#---------------------------------------------------------------------

=== modified file 'var/lib/sorcery/modules/libdispel' (properties changed)
--- var/lib/sorcery/modules/libdispel
+++ var/lib/sorcery/modules/libdispel
@@ -198,6 +198,11 @@
[ -f $REAPER_FILES ] && rmdir `dirnames < $REAPER_FILES |uniq|sort -r`
2>/dev/null

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
}

#-----
@@ -243,7 +248,7 @@
else
SCRIPT_DIRECTORY="`codex_find_spell_by_name $SPELL`"

- 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() {
+ :
+}



@@ -328,6 +350,14 @@
activity_log "dispel" "$SPELL" "$VERSION" "success"
) &&
reap_depends
+ local rc=$?
+ if [[ "$rc" != 0 ]] ; then
+ message "${PROBLEM_COLOR}Dispel of${DEFAULT_COLOR}" \
+ "${SPELL_COLOR}$SPELL${DEFAULT_COLOR}" \
+ "${PROBLEM_COLOR}failed!${DEFAULT_COLOR}"
+ return $rc
+ fi
+ return 0
}

#---------------------------------------------------------------------

=== 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
+}

#---------------------------------------------------------------------
## @param spell

=== modified file 'var/lib/sorcery/modules/libinitd' (properties changed)
=== modified file 'var/lib/sorcery/modules/libmedia' (properties changed)
--- var/lib/sorcery/modules/libmedia
+++ var/lib/sorcery/modules/libmedia
@@ -24,16 +24,16 @@

# color ASCII codes
#
- DEFAULT="\e[0m"
- BOLD="\e[1m"
- BLACK="\e[30m"
- RED="\e[31m"
- GREEN="\e[32m"
- YELLOW="\e[33m"
- BLUE="\e[34m"
- VIOLET="\e[35m"
- CYAN="\e[36m"
- WHITE="\e[37m"
+ DEFAULT_COLOR="\e[0m"
+ BOLD="\e[1m"
+ BLACK="\e[30m"
+ RED="\e[31m"
+ GREEN="\e[32m"
+ YELLOW="\e[33m"
+ BLUE="\e[34m"
+ VIOLET="\e[35m"
+ CYAN="\e[36m"
+ WHITE="\e[37m"

# color schemes
#
@@ -49,7 +49,6 @@
SYMLINK_COLOR="${CYAN}${BOLD}"
PROBLEM_COLOR="${RED}${BOLD}"
MESSAGE_COLOR="${CYAN}"
- DEFAULT_COLOR="${DEFAULT}"
;;

Xblueish)
@@ -63,7 +62,6 @@
SYMLINK_COLOR="${CYAN}${BOLD}"
PROBLEM_COLOR="${RED}${BOLD}"
MESSAGE_COLOR="${CYAN}"
- DEFAULT_COLOR="${DEFAULT}"
;;

X*)
@@ -77,7 +75,6 @@
SYMLINK_COLOR="${CYAN}${BOLD}"
PROBLEM_COLOR="${RED}${BOLD}"
MESSAGE_COLOR="${CYAN}"
- DEFAULT_COLOR="${DEFAULT}"
;;
esac
}

=== modified file 'var/lib/sorcery/modules/libmisc'
--- var/lib/sorcery/modules/libmisc
+++ var/lib/sorcery/modules/libmisc
@@ -836,7 +836,7 @@
local ANSWER
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} ]]"

# 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

=== modified file 'var/lib/sorcery/modules/libtablet'
--- var/lib/sorcery/modules/libtablet
+++ var/lib/sorcery/modules/libtablet
@@ -485,6 +485,7 @@
SPELL_DIRECTORY=$2
else
tablet_find_spell_dir $SPELL SPELL_DIRECTORY || return 1
+ TABLET_PAGE=$SPELL_DIRECTORY
fi

VERSION=$(<$SPELL_DIRECTORY/version)
@@ -594,7 +595,8 @@
else
codex_md5=$(md5sum $repair_file|cut -f1 -d' ')
tablet_md5=$(md5sum $tablet_file|cut -f1 -d' ')
- if [[ $spell_version == $key ]] ||
+ if [[ $key == "all" ]] ||
+ [[ $spell_version == $key ]] ||
[[ $spell_updated == $key ]] ||
[[ $spell_patchlevel == $key ]] ||
[[ $tablet_md5 == $key ]] ; then
@@ -847,12 +849,12 @@
return 0
else
message "Corrupt spell dir in tablet, this shouldnt happen."
- message "It'd be good to recast the spell now."
+ message "Please run cleanse --tablet"
return 1
fi
else
message "Missing spell dir in tablet, this shouldnt happen."
- message "It'd be good to recast the spell now."
+ message "Please run cleanse --tablet"
return 1
fi
}

=== modified file 'var/lib/sorcery/modules/libunpack'
--- var/lib/sorcery/modules/libunpack
+++ var/lib/sorcery/modules/libunpack
@@ -122,34 +122,17 @@
function real_unpack_file() {
debug "libgrimoire" "real_unpack_file - $*"

- local GPGNUM="$1"
- local SVAR="SOURCE${GPGNUM}"
-
- local crypto_func
- for crypto_func in GPG HASH IGNORE; do
- debug "libgrimoire" "checking $crypto_func verification"
- local AVAR="SOURCE${GPGNUM}_${crypto_func}"
- local AVARN="$AVAR"
- local iter=0
- local rc=""
- # NOTE ## date: 2005-08-25
- # This while loop runs through the SOURCEn_{GPG|HASH|IGNORE}m not the
- # SOURCEn_*[m] set of vars this is kinda confusing we might rip it out
- while [ -n "${!AVARN}" ]; do
- local lcase_crypto_func="$(echo $crypto_func | tr 'A-Z' 'a-z')"
- unpack_$lcase_crypto_func "${!SVAR}" "${!AVARN}"
- rc="$?"
- case "$rc" in
- 200) debug "libgrimoire" "falling back from $AVARN"; rc="" ;;
- 1) return "$rc" ;;
- 0) uncompress_unpack "${!SVAR}"; return "$?" ;;
- esac
- (( iter++ ))
- AVARN="$AVAR[$iter]"
- done
- [ -n "$rc" ] && return "$rc"
- done
-
+ local FILENUM="$1"
+ local SVAR="SOURCE${FILENUM}"
+
+ real_verify_file "$@"
+ rc=$?
+ case "$rc" in
+ 200) debug "libunpack" "unable to verify $SVAR ${!SVAR}" ;;
+ 1) return 1 ;; # verification failed
+ 0) uncompress_unpack ${!SVAR}; return $? ;;
+ esac
+
if false; then # <------ here's the switch to disable oldworld -------
debug "libgrimoire" "falling back to missing verification"
unpack_missing "${!SVAR}"
@@ -160,9 +143,44 @@
esac
else
debug "libgrimoire" "falling back to regular MD5[]"
- local MD5NUM="$([ -z "$GPGNUM" ] && echo 0 || echo "$(($GPGNUM - 1))")"
+ local MD5NUM="$([ -z "$FILENUM" ] && echo 0 || echo "$(($FILENUM - 1))")"
real_unpack "${!SVAR}" "${MD5[$MD5NUM]}"
fi
+}
+
+
+#---------------------------------------------------------------------
+## @Type API
+## @param SOURCE suffix
+##
+## Does the work of verifying a file with the new-world verification
+## system.
+#---------------------------------------------------------------------
+function real_verify_file() {
+ debug "libunpack" "real_verify_file - $*"
+
+ local FILENUM="$1"
+ local SVAR="SOURCE${FILENUM}"
+
+ local crypto_func
+ for crypto_func in GPG HASH IGNORE; do
+ debug "libgrimoire" "checking $crypto_func verification"
+
+ local AVAR="SOURCE${FILENUM}_${crypto_func}"
+ [[ -n ${!AVAR} ]] || continue
+
+ local rc=""
+ local lcase_crypto_func="$(echo $crypto_func | tr 'A-Z' 'a-z')"
+ unpack_$lcase_crypto_func "${!SVAR}" "${!AVAR}"
+ rc="$?"
+
+ case "$rc" in
+ 200) debug "libgrimoire" "unable to verify $AVAR with $crypto_func" ;;
+ *) return $rc ;;
+ esac
+
+ done
+ return 200
}


@@ -260,9 +278,10 @@
function unpack_spell_required() {
debug "libgrimoire" "Running unpack_spell_required -- $1"

- 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 @@

message "${MESSAGE_COLOR}GPG checking source file $1...${DEFAULT_COLOR}"

- unpack_spell_required gnupg || return "$?"
+ unpack_spell_required gnupg gpg || return "$?"

gpg_verify_signature "$( locate_spell_file "$SFNAME" )" \
"$FILENAME" \
@@ -428,10 +447,11 @@
if [ "$MD5SUM_DL" != "off" ]; then

if [[ "$ALGORITHM" == md5 ]] || [[ "$ALGORITHM" == sha1 ]] ; then
- unpack_spell_required coreutils "$ALGORITHM" || return "$?"
+ unpack_spell_required coreutils "${ALGORITHM}sum" "$ALGORITHM" ||
+ return "$?"
HASH="$(${ALGORITHM}sum "$FILENAME" | cut -d' ' -f1)"
else
- unpack_spell_required gnupg "$ALGORITHM" || return "$?"
+ unpack_spell_required gnupg gpg "$ALGORITHM" || return "$?"
if list_find "$(gpg_get_hashes)" $ALGORITHM; then
HASH="$(gpg_hashsum "${ALGORITHM}" "$FILENAME" | cut -d' ' -f1)"
else

=== modified file 'var/lib/sorcery/modules/url_handlers/url_svn' (properties
changed)



  • [SM-Commit] BZR Change 2 to stable sorcery by Andrew Stitt <astitt AT sourcemage.org>, scm, 04/30/2006

Archive powered by MHonArc 2.6.24.

Top of Page