Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test-1.13 sorcery by Andrew Stitt

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andrew Stitt <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to test-1.13 sorcery by Andrew Stitt
  • Date: Tue, 23 May 2006 12:06:28 -0500

GIT changes to test-1.13 sorcery by Andrew Stitt
<afrayedknot@thefrayedknot.(none)>:

ChangeLog | 44 +++++++++
build | 2
etc/sorcery/version | 2
usr/sbin/gaze | 7 +
usr/sbin/scribe | 2
var/lib/sorcery/modules/dl_handlers/dl_git | 80 +++++++++++++++++
var/lib/sorcery/modules/libapi | 81 +++++++++++++++++
var/lib/sorcery/modules/libdepends | 54 +++++++----
var/lib/sorcery/modules/libdispel | 49 ++++++++--
var/lib/sorcery/modules/libmisc | 2
var/lib/sorcery/modules/libsummon | 9 -
var/lib/sorcery/modules/libtablet | 3
var/lib/sorcery/modules/libunpack | 78 ++++++++++-------
var/lib/sorcery/modules/url_handlers/url_git | 122
+++++++++++++++++++++++++++
14 files changed, 463 insertions(+), 72 deletions(-)

New commits:
commit ad338b5219562b76bd8d13b40ea8da211ba79d10
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 20
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Fri 2006-05-12 10:15:47 -0700
message:
version++

commit 901e701c4b0224b3879f375459e7e4bbb3dc0a8c
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 19
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Fri 2006-05-12 10:14:20 -0700
message:
fix bug 11413, untar permissions

commit 706c9c13944e544f4af85d35cb4cc608908a2efc
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 18
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Mon 2006-05-01 22:42:10 -0700
message:
version++

commit bb0b501a28b2a5410df7c0496b9a3c009824cfca
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 17
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Mon 2006-05-01 22:39:16 -0700
message:
merge fix for default provider searching

commit ef0e46cbef48bca9c3cd22ff7bbb380f98123bed
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 16
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Fri 2006-04-21 08:59:24 -0700
message:
version++

commit 54c59b9c908ae81273e43f196b30962e88c964e5
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 15
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

commit 792ffd58dabce6f7a5f5d0714d90dc4b10f929d9
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 14
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Wed 2006-04-12 09:37:03 -0700
message:
fix bug 10682

commit bd66f4daa06289b268720d9d0ad1b74085238298
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 13
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Wed 2006-04-12 09:27:56 -0700
message:
version++

commit 074afed47188617d87df009b5b77b44e9dd17019
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 12
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Wed 2006-04-12 09:25:46 -0700
message:
fix bug 10144

commit 5ad7d6ff2e4e918c0fe57ea2834901a2af3b5be1
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 11
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Mon 2006-04-10 12:37:30 -0700
message:
version++

commit d8e3ebe8fb271d89c2b1cc864d5a2dfe5a56f8ce
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 10
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Mon 2006-04-10 12:33:34 -0700
message:
pull git handlers into test

commit c69a902b54d9c1774f0204f57a55508e281b9208
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 9
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Sat 2006-04-08 13:06:01 -0700
message:
fix bugs 10855 and 10900

commit 17a805c43370b097e20c8e2c5dfe0587ab880157
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 8
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Thu 2006-04-06 17:14:22 -0700
message:
version++

commit 8b59ae6205436a3af1d7090931382df63b2304fe
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 7
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: testa
timestamp: Thu 2006-04-06 17:00:41 -0700
message:
fix bug 10869

commit 7d2673231fa3e7e6fdaa763420e43b921e0b6b96
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 6
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

commit 2100f6d827437e41db349154c48626085c57fd4d
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 5
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

commit 0343639ba70fbc663cf65ff6e6b908a5b837c97b
Author: Andrew Stitt <afrayedknot@thefrayedknot>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 4
committer: Andrew Stitt <afrayedknot@thefrayedknot>
branch nick: test
timestamp: Tue 2006-04-04 20:42:31 -0700
message:
version++

commit 77f304be7d35446495eeb4ddbee680437b10812d
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <afrayedknot@thefrayedknot.(none)>

------------------------------------------------------------
revno: 3
committer: Andrew Stitt <astitt AT sourcemage.org>
branch nick: test
timestamp: Tue 2006-04-04 20:20:49 -0700
message:
fix bug 10357

diff --git a/ChangeLog b/ChangeLog
index 2c69433..5781aea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,50 @@
2006-03-26 Andrew Stitt <astitt AT sourcemage.org>
* libsorcery: default to no fuzzy extension matching, bug 10761

+2006-05-12 Andrew Stitt <astitt AT sourcemage.org>
+ * libunpack: change parameters passed to tar, bug 11413, pull
+ * libunpack: pull change from David Brown: added
+ --no-same-permissions to tar to fix permissions problems when
+ untaring files with og+w
+
+2006-05-01 Andrew Stitt <astitt AT sourcemage.org>
+ * libdepends: fix search for default provider
+
+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.
diff --git a/build b/build
index 8f737c6..279da2f 100755
--- a/build
+++ b/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))
diff --git a/etc/sorcery/version b/etc/sorcery/version
index 7803689..c0b9e7a 100644
--- a/etc/sorcery/version
+++ b/etc/sorcery/version
@@ -1 +1 @@
-1.13.5-rc5
+1.13.6-rc2
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 51cb797..e74426b 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -1735,7 +1735,12 @@ parse() {

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

diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 76be418..a4c4d46 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -210,7 +210,7 @@ function scribe_add_update_worker() {
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"
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_git
b/var/lib/sorcery/modules/dl_handlers/dl_git
new file mode 100755
index 0000000..26e8fff
--- /dev/null
+++ b/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
+##
+#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index 9cfde4a..4b9e903 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -25,12 +25,17 @@ # config_query_option (libmisc)
# 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 @@ # uncompress (libunpack)
# 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 @@ function default_build () {

#---------------------------------------------------------------------
## @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 @@ function default_post_install () {

#---------------------------------------------------------------------
## @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.
@@ -360,6 +402,30 @@ function 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 "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
## @param spell/service
## @param enabled options (optional)
## @param description (optional)
@@ -1016,6 +1082,21 @@ function unpack_file_simple() {

#---------------------------------------------------------------------
## @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.
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index a9c7094..5be17ab 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -93,13 +93,19 @@ function run_prepare()
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
+ . $SCRIPT_DIRECTORY/PREPARE
+ else
+ default_prepare
fi
+ rc=$?
+ persistent_save
+ return $rc
+}
+
+function real_default_prepare() {
+ :
}

#---------------------------------------------------------------------
@@ -129,17 +135,22 @@ function run_configure()
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
+ . $SCRIPT_DIRECTORY/CONFIGURE
+ else
+ default_configure
fi
+ rc=$?
+ persistent_save
+ return $rc
+}
+
+function real_default_configure() {
+ :
}

#---------------------------------------------------------------------
@@ -152,16 +163,21 @@ function run_depends()
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
+ . $SCRIPT_DIRECTORY/DEPENDS
+ else
+ default_depends
fi
+ rc=$?
+ persistent_save
+ return $rc
+}
+
+function real_default_depends() {
+ :
}

#---------------------------------------------------------------------
@@ -667,7 +683,7 @@ function work_depends_provider()

# check if theres a default provider
if [[ ! $default ]]; then
- explode "$(search_default_provider $DEFAULT_PROVIDERS "" "$1")" ":"
"status"
+ explode "$(search_default_provider $DEFAULT_PROVIDERS ".*" "$1")" ":"
"status"
tmp=${status[0]}
[[ $tmp ]] && echo $CANDIDATES|grep -q "\<$tmp\>" && default=$tmp
fi
@@ -760,7 +776,7 @@ function work_optional_depends_provider(

# check if theres a default provider
if [[ ! $default ]]; then
- tmp=$(search_default_provider $DEFAULT_PROVIDERS "" "$1")
+ tmp=$(search_default_provider $DEFAULT_PROVIDERS ".*" "$1")

# make sure we found /something/ before trying to analyze it
# otherwise we'll fall into the else case and use 'none' as the
diff --git a/var/lib/sorcery/modules/libdispel
b/var/lib/sorcery/modules/libdispel
index a7039db..6f4c4c1 100755
--- a/var/lib/sorcery/modules/libdispel
+++ b/var/lib/sorcery/modules/libdispel
@@ -268,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
+ 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
+ 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() {
+ :
+}



@@ -333,6 +350,14 @@ function dispel_spell() {
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
}

#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 8a8c503..613cd66 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1128,7 +1128,7 @@ function smgl_which() {
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
diff --git a/var/lib/sorcery/modules/libsummon
b/var/lib/sorcery/modules/libsummon
index e6d5125..123d0b7 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -49,7 +49,6 @@ function summon_spell() {
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 @@ function summon_spell() {

# this actually only returns from the subshell, not the function
return $rc
- ) &&
- popd &>/dev/null
- rm -rf $dl_dir
+ ) && popd &>/dev/null
rc=$?
+ rm -rf $dl_dir
+ unlock_resources "summon" "${SPELL}"
fi
return $rc
}
@@ -382,7 +381,7 @@ function unpack_for_update() {
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
diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 6976957..be64882 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -595,7 +595,8 @@ function tablet_check_repair_file() {
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
diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 2fca0ed..0aa8584 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/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,13 +143,48 @@ function real_unpack_file() {
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
+}
+
+
+#---------------------------------------------------------------------
## @param filename
## @param compressor
## @Stdout uncompressed
@@ -207,8 +225,8 @@ function unpack_core() {

case "$2" in
bzip2|gzip|compress*|tar)
- tar --owner=root --group=root -xf /dev/stdin \
- 2> /dev/null || cat > /dev/null ;;
+ tar --no-same-owner --no-same-permissions -xf \
+ /dev/stdin 2> /dev/null || cat > /dev/null ;;
Zip) cat /dev/stdin >/dev/null #get rid of unused output
unzip -q "$1" ;;
RPM) cpio -idm < /dev/stdin ;;
diff --git a/var/lib/sorcery/modules/url_handlers/url_git
b/var/lib/sorcery/modules/url_handlers/url_git
new file mode 100755
index 0000000..ae61565
--- /dev/null
+++ b/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
+##
+#---------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page