Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (06b0376f193662002b0c2b18b237df55398fb957)
  • Date: Mon, 4 Feb 2008 09:52:11 -0600

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

ChangeLog | 1
usr/sbin/cast | 2
usr/sbin/cleanse | 12 +--
usr/sbin/delve | 6 -
usr/sbin/gaze | 14 +++-
usr/sbin/scribbler | 3
usr/sbin/scribe | 8 --
var/lib/sorcery/modules/build_api/api2 | 6 -
var/lib/sorcery/modules/build_api/common | 5 -
var/lib/sorcery/modules/dl_handlers/dl_cvs | 1
var/lib/sorcery/modules/dl_handlers/dl_dir | 1
var/lib/sorcery/modules/dl_handlers/dl_file | 1
var/lib/sorcery/modules/dl_handlers/dl_rsync | 8 +-
var/lib/sorcery/modules/dl_handlers/dl_wget | 16 ++--
var/lib/sorcery/modules/libapi | 5 -
var/lib/sorcery/modules/libcast | 7 --
var/lib/sorcery/modules/libcodex | 12 +--
var/lib/sorcery/modules/libdepends | 8 +-
var/lib/sorcery/modules/libdepengine | 8 --
var/lib/sorcery/modules/libdispel | 1
var/lib/sorcery/modules/libdownload | 9 +-
var/lib/sorcery/modules/libgpg | 80
++++++++++--------------
var/lib/sorcery/modules/libhash | 7 +-
var/lib/sorcery/modules/liblock | 22 +++---
var/lib/sorcery/modules/libmisc | 57 ++++++++---------
var/lib/sorcery/modules/libresurrect | 82
++++++++++++-------------
var/lib/sorcery/modules/libspell | 1
var/lib/sorcery/modules/libstate | 47 ++++++--------
var/lib/sorcery/modules/libtablet | 41 +++++-------
var/lib/sorcery/modules/libtrack | 78 ++++++++++-------------
var/lib/sorcery/modules/liburl | 18 +----
var/lib/sorcery/modules/url_handlers/url_cvs | 1
var/lib/sorcery/modules/url_handlers/url_dir | 1
var/lib/sorcery/modules/url_handlers/url_file | 1
var/lib/sorcery/modules/url_handlers/url_http | 12 +--
var/lib/sorcery/modules/url_handlers/url_rsync | 1
var/lib/sorcery/subroutines | 1
37 files changed, 267 insertions(+), 317 deletions(-)

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

*: comment fixes for bashdoc - modified patch from Arvid Norlander

diff --git a/ChangeLog b/ChangeLog
index 571cb13..09a4a3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
don't output anything when listing and there is nothing to show;
support passing spells or configs as arguments and only working on
them
* delve, libtablet: added 3 missing ;; - patch from Arvid Norlander
+ * *: comment fixes for bashdoc - modified patch from Arvid Norlander

2008-02-03 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libunpack: return 1 when no algorithm is allowed
diff --git a/usr/sbin/cast b/usr/sbin/cast
index fd9c01c..398c131 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -477,7 +477,6 @@ function pass_two() {
}

#---------------------------------------------------------------------
-
## @param spellname
## @Globals SPELL
## Sets SPELL to the spellname and calls summon_spell with spellname
@@ -983,4 +982,3 @@ debug "cast" "exiting..."
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index 80429cc..a96c671 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -79,19 +79,15 @@ EOF
#---------------------
## Interpret the arguments to this script
## @Args --help Display help
-## @Args --delint [full] Find stale dependency entries, with full it'll
-## look at off entries too
-## @Args --prune [doit] Find missing spells, do the actions of "doit" is
-## specified
-## @Args --packages Find packages entries that are corrupted, or
-## non-existant
+## @Args --delint [full] Find stale dependency entries, with full it'll
look at off entries too
+## @Args --prune [doit] Find missing spells, do the actions of "doit" is
specified
+## @Args --packages Find packages entries that are corrupted, or
non-existant
## @Args --tablet Clean up the tablet
## @args --tablet_spell Clean up the tablet for one spell
## @Args --logs Remove stale logs
## @Args --sweep Remove uneeded spool and cache files
## @Args --sweep_all Remove uneeded spool and cache files
-## @Args --fix Find binaries that are missing libs and files,
-## and recast broken spells
+## @Args --fix Find binaries that are missing libs and files,
and recast broken spells
## @Args --nofix Same as --fix, but won't recast.
## @Args --nofix_quick Same as --nofix, but doesn't check dependent
spells
#---------------------
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 9c207e3..762c08d 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -1,9 +1,9 @@
#!/bin/bash
#---------------------------------------------------------------------
## @Synopsis Delve is a tool for running individual spell files during the
-## build and install phase. This can be used as a debugging tool or to
-## "force" a spell to be installed. Use with caution and keep your hands
-## off if you dont know what you are doing.
+## @Synopsis build and install phase. This can be used as a debugging tool
or to
+## @Synopsis "force" a spell to be installed. Use with caution and keep your
hands
+## @Synopsis off if you dont know what you are doing.
##
## @Copyright 2004 the Source Mage Team
## @Author Andrew Stitt
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 992e659..3eb64a2 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -222,14 +222,22 @@ function import_snapshot() {
## Is this used anywhere?
## @param File with list of files the sum
#-----
-function checksum() { for FILE in `cat $1 | files`; do sum -s $FILE;
done; }
+function checksum() {
+ for FILE in `cat $1 | files`; do
+ sum -s $FILE
+ done
+}

#-----
## Run an md5sum of a list of files in a file
## Is this used anywhere?
## @param File with list of files the sum
#-----
-function md5sum_files() { for FILE in `cat $1 | files`; do md5sum "$FILE";
done; }
+function md5sum_files() {
+ for FILE in `cat $1 | files`; do
+ md5sum "$FILE"
+ done
+}

#-----
## Find all files on the system not installed by a spell
@@ -1678,7 +1686,6 @@ function gaze_install() {
## used by system_info()
##
#---------------------------------------------------------------------
-
function figure_installed()
{
local version
@@ -1695,7 +1702,6 @@ function figure_installed()
## displays various information about a Source Mage system
##
#---------------------------------------------------------------------
-
function gaze_system_info()
{
local base_system
diff --git a/usr/sbin/scribbler b/usr/sbin/scribbler
index c3c55c5..1d0259e 100755
--- a/usr/sbin/scribbler
+++ b/usr/sbin/scribbler
@@ -2,7 +2,7 @@
#---------------------------------------------------------------------
##
## @Synopsis This utility lets you manage moving spells to your private
-## grimoire so you can mix-and-match versions from various other grimoires.
+## @Synopsis grimoire so you can mix-and-match versions from various other
grimoires.
##
## @Copyright
##
@@ -193,4 +193,3 @@ main "$@"
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 341bda4..50a3a84 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -5,10 +5,9 @@
##
## @Synopsis scribe handles adding/updating/reindexing/etc. of grimoires
##
-## @Copyright
-## Original version Copywright 2002 by Ryan Abrams
-## Additions/Corrections Copyright 2002-2004 by the Source Mage Team
-## Released under the GPL
+## @Copyright Original version Copywright 2002 by Ryan Abrams
+## @Copyright Additions/Corrections Copyright 2002-2004 by the Source Mage
Team
+## @Copyright Released under the GPL
#---------------------------------------------------------------------


@@ -756,7 +755,6 @@ reindex-keyword) scribe_reindex_keyword $@ ;;
esac
}

-#---------------------------------------------------------------------
. /etc/sorcery/config

#check if root. If not, become root
diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index 983adad..d1ca054 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -248,9 +248,9 @@ function run_post_install() {
}

#--------------------------------------------------------------------
-### Checks against STAGED_INSTALL and installs the staged spell
-### accordingly
-##--------------------------------------------------------------------
+## Checks against STAGED_INSTALL and installs the staged spell
+## accordingly
+#--------------------------------------------------------------------
function run_transfer() {
if [[ "$STAGED_INSTALL" != "off" ]]
then
diff --git a/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index d905b76..b35d4d2 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -15,14 +15,14 @@
##=head1 FUNCTIONS
#---------------------------------------------------------------------

+# checks for a security file
+# returns 0 if spell should be cast, 1 otherwise
#---------------------------------------------------------------------
## Prompts the user about possible security problems with the current
## spell. Allows a safe way of failing a spell due to security problems.
## @return 0 if there are no security problem or the user acknowledges them.
## @return 1 if the user decides not to accept the security concerns
#---------------------------------------------------------------------
-# checks for a security file
-# returns 0 if spell should be cast, 1 otherwise
function run_security() {
debug "build_api/common" "Starting run_security() on $SPELL"
if [ -f $SCRIPT_DIRECTORY/SECURITY ]; then
@@ -141,7 +141,6 @@ save_bin_lib_paths
## dispelled
##
#--------------------------------------------------------------------
-
function save_bin_lib_paths()
{
# TODO this is a dirty hack we need to remove it
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_cvs
b/var/lib/sorcery/modules/dl_handlers/dl_cvs
index 6823c4a..f191a99 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_cvs
+++ b/var/lib/sorcery/modules/dl_handlers/dl_cvs
@@ -106,4 +106,3 @@ function dl_cvs_get() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_dir
b/var/lib/sorcery/modules/dl_handlers/dl_dir
index 5928343..1b1fbc3 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_dir
+++ b/var/lib/sorcery/modules/dl_handlers/dl_dir
@@ -89,4 +89,3 @@ function url_dir_get() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_file
b/var/lib/sorcery/modules/dl_handlers/dl_file
index 6cdd25f..35b4a06 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_file
+++ b/var/lib/sorcery/modules/dl_handlers/dl_file
@@ -66,4 +66,3 @@ function dl_file_get() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_rsync
b/var/lib/sorcery/modules/dl_handlers/dl_rsync
index 1b2d5a1..8120d63 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_rsync
+++ b/var/lib/sorcery/modules/dl_handlers/dl_rsync
@@ -81,10 +81,10 @@ function dl_rsync_get() {
}

#---------------------------------------------------------------------
-#=item dl_rsync_run_rsync <url> <to>
-#
-# Private function. Calls rsync and beautifies output
-#
+##=item dl_rsync_run_rsync <url> <to>
+##
+## Private function. Calls rsync and beautifies output
+##
#---------------------------------------------------------------------
function dl_rsync_run_rsync() {
local target=$1
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_wget
b/var/lib/sorcery/modules/dl_handlers/dl_wget
index 9272aa3..216154a 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_wget
+++ b/var/lib/sorcery/modules/dl_handlers/dl_wget
@@ -51,10 +51,10 @@ function dl_wget_get() {
}

#---------------------------------------------------------------------
-# dl_wget_call_wget <filename> <extension-less filename> <url>
-#
-# Private Function. Call wget to download the url.
-#
+## dl_wget_call_wget <filename> <extension-less filename> <url>
+##
+## Private Function. Call wgets to download the url.
+##
#---------------------------------------------------------------------
function dl_wget_call_wget() {
local FILE=$1
@@ -73,10 +73,10 @@ function dl_wget_call_wget() {
}

#---------------------------------------------------------------------
-# dl_wget_set_wget_options
-#
-# Private Function. Sets wget options
-#
+## dl_wget_set_wget_options
+##
+## Private Function. Sets wget options
+##
#---------------------------------------------------------------------
function dl_wget_set_options() {
local URL=$1
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index 76a3099..e1d8e30 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -12,8 +12,8 @@
#---------------------------------------------------------------------

#---------------------------------------------------------------------
-# @NOTE: The following list and the function definition should be in
-# alphabetical order. If this is not the case, please file a bug
+## @NOTE The following list and the function definition should be in
+## @NOTE alphabetical order. If this is not the case, please file a bug
#---------------------------------------------------------------------

#---------------------------------------------------------------------
@@ -1230,4 +1230,3 @@ function track_manual() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index c0950ea..882d7be 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -1,9 +1,9 @@
#!/bin/bash
#---------------------------------------------------------------------
## @Synopsis Functions for dealing with the actual
-## compiling/installation of spells and walking through casts 'pass 4'
pipeline.
+## @Synopsis compiling/installation of spells and walking through cast's
'pass 4' pipeline.
## @Copyright Copyright (C) 2002 The Source Mage Team
-## &lt;http://www.sourcemage.org&gt;
+## @Copyright &lt;http://www.sourcemage.org&gt;
## @Globals $SGL_LIBRARY_MODULES $GRIMOIRE $BUILD_API $USE_FUNCTIONS
## A spell follows the following path during its installation:
## PREPARE -&gt; DETAILS -&gt; PRE_BUILD -&gt; BUILD, or COMPILE/INSTALL
-&gt;
@@ -86,8 +86,7 @@ function prepare_spell_config() {
## Prompts the user about spells that are in conflict with the current
## spell and allows them to dispel them. If the user chooses not to
## dispel the conflicting spell, the function returns 1
-## @param dis-allow conflict with anything in this list, normally used
-## to prevent self conflicts
+## @param dis-allow conflict with anything in this list, normally used to
prevent self conflicts
## @return nothing if the user dispels the conflicting spell
## @return 1 if the user chooses not to dispel the conflicting spell
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libcodex
b/var/lib/sorcery/modules/libcodex
index 22dcd1d..d01eb85 100755
--- a/var/lib/sorcery/modules/libcodex
+++ b/var/lib/sorcery/modules/libcodex
@@ -535,8 +535,8 @@ function codex_get_spell_names() {
## grimoires. Nothing is listed if no spells exist in any of grimoires.
##
##
-## NOTE: This should be fixed so only the first of duplicate spells
-## are listed.
+## @NOTE This should be fixed so only the first of duplicate spells
+## @NOTE are listed.
##
#---------------------------------------------------------------------
function codex_get_all_spells() {
@@ -631,8 +631,8 @@ function codex_set_current_spell() {
}

#---------------------------------------------------------------------
-# Load just the very basics for a spell, skip build api, libcompat
-# and other debug stuff. Intended for use in tight loops.
+## Load just the very basics for a spell, skip build api, libcompat
+## and other debug stuff. Intended for use in tight loops.
#---------------------------------------------------------------------
function codex_set_current_spell_quick() {
codex_get_spell_paths $1
@@ -646,8 +646,8 @@ function codex_set_current_spell_quick() {


#---------------------------------------------------------------------
-# Setup the various spell paths associated with a spell without
-# loading it.
+## Setup the various spell paths associated with a spell without
+## loading it.
#---------------------------------------------------------------------
function codex_get_spell_paths() {
SPELL_DIRECTORY=$1
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 0f3f7cf..4524432 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -1370,10 +1370,10 @@ function real_sub_depends() {
}

#---------------------------------------------------------------------
-# Force a spell to be recast, if it comes up for processing
-# if the spell was already looked at and processed nothing happens
-# if the spell was already looked at and didnt need processing, then
-# it'll get re-processed (assuming the caller also did a depends on it)
+## Force a spell to be recast, if it comes up for processing
+## if the spell was already looked at and processed nothing happens
+## if the spell was already looked at and didnt need processing, then
+## it'll get re-processed (assuming the caller also did a depends on it)
#---------------------------------------------------------------------
function real_force_depends() {
debug "libdepends" "$FUNCNAME - $SPELL - $@"
diff --git a/var/lib/sorcery/modules/libdepengine
b/var/lib/sorcery/modules/libdepengine
index 91486a9..0aa6396 100755
--- a/var/lib/sorcery/modules/libdepengine
+++ b/var/lib/sorcery/modules/libdepengine
@@ -75,8 +75,7 @@ function depengine_entry_point() {
## Builds the children, then itself, then executes triggers.
##
## @param Spell to cast
-## @param In trigger flag, default 0. If 1 and a depends loop exists
-## back-off and fail gracefully.
+## @param In trigger flag, default 0. If 1 and a depends loop exists
back-off and fail gracefully.
#------------------------------------------------------------------------
function depengine_cast_engine() {
$STD_DEBUG
@@ -135,10 +134,9 @@ function depengine_cast_engine() {
#------------------------------------------------------------------------
## Iterative recursive step. Build each of the spell's dependencies.
## @param Spell
-## @param In trigger flag (optional) if 1, then back off more readily in
-## the event of a dependency loop.
+## @param In trigger flag (optional) if 1, then back off more readily in the
event of a dependency loop.
## @global MINUS_K if 'yes', then act like make -k and continue building
-## dependent spells even if another one fails.
+## @global dependent spells even if another one fails.
##
#------------------------------------------------------------------------
function recurse_depends() {
diff --git a/var/lib/sorcery/modules/libdispel
b/var/lib/sorcery/modules/libdispel
index d0f5395..32d2bf0 100755
--- a/var/lib/sorcery/modules/libdispel
+++ b/var/lib/sorcery/modules/libdispel
@@ -295,7 +295,6 @@ function post_remove() {
#---------------------------------------------------------------------
## Dispel a spell
#---------------------------------------------------------------------
-
function dispel_spell() {

local SPELL=$1
diff --git a/var/lib/sorcery/modules/libdownload
b/var/lib/sorcery/modules/libdownload
index 7c721ae..5ee013d 100755
--- a/var/lib/sorcery/modules/libdownload
+++ b/var/lib/sorcery/modules/libdownload
@@ -16,6 +16,7 @@
## need to.
##
## WRITING NEW DL HANDLERS
+## <pre>
## Current dl handlers only need a single function
## "dl_get_<handler>" This function takes the following arguments:
## $target
@@ -26,7 +27,7 @@
## result directory or file
## $dl_type Name of the variable in which to store the type of
## thing downloaded
-##
+## </pre>
##
## The target parameter is advisory, it is a hint at what might be
downloaded.
##
@@ -60,12 +61,11 @@ fi
## by the specified handler.
##
## @Param type Name of handler
-## The remainder of the arguments are target, url_list, hints, dl_target
-## and dl_type. See above for information.
+## @Note The remainder of the arguments are target, url_list, hints,
dl_target
+## @Note and dl_type. See above for information.
##
##
#-------------------------------------------------------------------------
-
function dl_get_bucket() {
$STD_DEBUG
local handler=$1
@@ -226,4 +226,3 @@ EOF
## 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/libgpg b/var/lib/sorcery/modules/libgpg
index 8a73ba0..682d1cf 100755
--- a/var/lib/sorcery/modules/libgpg
+++ b/var/lib/sorcery/modules/libgpg
@@ -17,11 +17,11 @@
## @param public keyring
##
## @return 0 on success, non-zero on failure:
-## 1: verification failure
-## 3: no signature file
-## 4: no file to verify
-## 5: no keyring
-## 200: gpg isnt installed
+## @return 1 verification failure
+## @return 3 no signature file
+## @return 4 no file to verify
+## @return 5 no keyring
+## @return 200 gpg isnt installed
##
## @stdout message when gpg is not installed
##
@@ -104,19 +104,16 @@ function gpg_get_grimoire_key() {
## Verify a grimoire tarball's gpg signature
## @param file on local disk to verify
## @param url from which to get the signature
-## @param (optional) grimoire branch, if derive it from the filename with
-## ${SOURCE%%*.}
-## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
-## from $2
+## @param (optional) grimoire branch, if derive it from the filename with
${SOURCE%%*.}
+## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
from $2
## @return 0 on success, non-zero on failure:
-## 1: verification failed
-## 2: verification is disabled
-## 254: no keyring found
-## 255: could not download signature
-## anything else see gpg_verify_signature
+## @return 1 verification failed
+## @return 2 verification is disabled
+## @return 254 no keyring found
+## @return 255 could not download signature
+## @return anything else see gpg_verify_signature
##
-## @stdout possibly a failure message depending on what happens (nothing
-## is output on success)
+## @stdout possibly a failure message depending on what happens (nothing is
output on success)
#---------------------------------------------------------------------
function gpg_verify_grimoire() {
if [[ "$GPG_VERIFY_GRIMOIRE" != on ]] ; then
@@ -187,18 +184,16 @@ function verify_grimoire_tree() {
## Verify a sorcery tarball's gpg signature
## @param file on local disk to verify
## @param url from which to get the signature
-## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
-## from $2
+## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
from $2
##
## @return 0 on success, non-zero on failure:
-## 1: verification failed
-## 2: verification is disabled
-## 254: no keyring found
-## 255: could not download signature
-## anything else see gpg_verify_signature
+## @return 1 verification failed
+## @return 2 verification is disabled
+## @return 254 no keyring found
+## @return 255 could not download signature
+## @return anything else see gpg_verify_signature
##
-## @stdout possibly a failure message depending on what happens (nothing
-## is output on success)
+## @stdout possibly a failure message depending on what happens (nothing is
output on success)
#---------------------------------------------------------------------
function gpg_verify_sorcery() {
if [[ "$GPG_VERIFY_SORCERY" != on ]] ; then
@@ -224,18 +219,15 @@ function gpg_verify_sorcery() {
## @param file on local disk to verify
## @param url from which to get the signature
## @param keyring to verify with
-## @param grimoire or sorcery, whatever it is thats being verified (used in
-## an output message
-## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
-## from $2
+## @param grimoire or sorcery, whatever it is thats being verified (used in
an output message
+## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
from $2
##
## @return 0 on success, non-zero on failure:
-## 1: verification failed
-## 255: could not download signature
-## anything else see gpg_verify_signature
+## @return 1 verification failed
+## @return 255 could not download signature
+## @return anything else see gpg_verify_signature
##
-## @stdout possibly a failure message depending on what happens (nothing
-## is output on success)
+## @stdout possibly a failure message depending on what happens (nothing is
output on success)
#---------------------------------------------------------------------
function gpg_verify_common() {
# download the signature
@@ -276,11 +268,12 @@ function gpg_verify_common() {
## gpg_verify_grimoire.
##
## @param return code of gpg_verify_sorcery or gpg_verify_grimoire
-## @return 0 if the program should continue, 1 if not
+## @return 0 if the program should continue
+## @return 1 if not
##
## @stdout Some message thats supposed to inform the user of whats
-## going on, or possibly a query asking the user if they want
-## to continue even though gpg verification failed.
+## @stdout going on, or possibly a query asking the user if they want
+## @stdout to continue even though gpg verification failed.
#---------------------------------------------------------------------
function gpg_user_query() {
local rc=$1
@@ -314,9 +307,9 @@ function gpg_user_query() {
#---------------------------------------------------------------------
## @param algorithm to use
## @param file to get hashsum of
-## @out output is exactly the same format as md5sum/sha1sum, just with
-## a different hashsum. "hashsum<space><space>filename". The hashsum is
-## printed with all lowercase letters.
+## @stdout output is exactly the same format as md5sum/sha1sum, just with
+## @stdout a different hashsum. "hashsum<space><space>filename". The hashsum
is
+## @stdout printed with all lowercase letters.
##
## This assumes that the caller has already verified that gpg is
## installed and supports the specified hash function.
@@ -331,8 +324,8 @@ function gpg_hashsum() {
}

#---------------------------------------------------------------------
-## @out All the hash algorithms supported by gpg, algorithms printed in
-## lower case.
+## @stdout All the hash algorithms supported by gpg, algorithms printed in
+## @stdout lower case.
##
## This assumes the caller has already verified that gpg is installed.
#---------------------------------------------------------------------
@@ -343,8 +336,7 @@ function gpg_get_hashes() {
#---------------------------------------------------------------------
## Verify a tree against a manifest file
## @param directory to verify
-## @param manifest file, the format is like what the md5sum tool would
-## produce
+## @param manifest file, the format is like what the md5sum tool would
produce
## @param algorithm to use, this can be anything supported by gpg
## @param regular expression of files to ignore
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libhash b/var/lib/sorcery/modules/libhash
index 8fabad7..a757c77 100755
--- a/var/lib/sorcery/modules/libhash
+++ b/var/lib/sorcery/modules/libhash
@@ -21,14 +21,15 @@
## hash_get "myTable" "aField"
##
## In this example, the hash_get function would echo "theValue".
+## hash_get_ref can also be used here and has the benefit of being forkless.
## </pre>
-## <br>
+## <br />
## <p>IMPLEMENTATION NOTE</p>
-## <br>
+## <br />
## Bash does not provide direct support for hash tables. These
## functions are implemented by first building a variable using the
## table name and field name, then using the eval function to store
-## (retrieve) value into (from) the variable.
+## (retrieve) value into (from) the variable.<br />
##
## The idea for the hash data structure in bash was inspired by a
## short example by Phil Howard which shows the use of hashes in bash.
diff --git a/var/lib/sorcery/modules/liblock b/var/lib/sorcery/modules/liblock
index f8ea666..70cd4b2 100755
--- a/var/lib/sorcery/modules/liblock
+++ b/var/lib/sorcery/modules/liblock
@@ -24,7 +24,7 @@
## lock_resources
## @param Type of resource
## @param Name of resource
-##
+## <pre>
## Type of resource | Name of resource | Usage
## cast | spell name | when casting a spell
## file | file name | to lock a file
@@ -32,6 +32,7 @@
## network | network | ?
## solo | resource name | when using a resource exclusively
## libgrimoire | install | when a spell is in the install stage
+## </pre>
## locking solo will not cause these routines to behave any different.
## catching it has to be done externally (see cast for an example)
##
@@ -242,9 +243,9 @@ function unlock_file()
## If not all can be locked, they will be unlocked, and another try
## will be made.
##
-## @return The name of a temporary file that should be written to
-## instead of the real file.
-##
+## @Stdout The name of a temporary file that should be written to instead of
the real file.
+## @return 0 If successful
+## @return 1 If not successful
#---------------------------------------------------------------------
function lock_start_transaction()
{
@@ -457,10 +458,10 @@ function counter_clean() {
##
## Prevents more than one process from entering a section of code
## at a time
-## NOTE: This assumes that two functions of the same name will
-## not havethe SYNCHRONIZE command on the same line in different
-## files.
-##
+## @NOTE This assumes that two functions of the same name will
+## @NOTE not havethe SYNCHRONIZE command on the same line in different
+## @NOTE files.
+## <pre>
## Example:
## #!/bin/bash
## echo "Script started with PID=$$
@@ -469,11 +470,11 @@ function counter_clean() {
## sleep 10
## } && eval "$UNSYNCHRONIZE"
## echo "PID $$ done."
-##
+## </pre>
## Note: SYNCHRONIZE and UNSYNCHRONIZE must be in the same local
## scope. Nested SYNCHs are not allowed in the same local scopes.
## Local scope usualy being a function.
-## (Blocking)
+## @Blocking
##
#---------------------------------------------------------------------
SYNCHRONIZE='
@@ -491,4 +492,3 @@ UNSYNCHRONIZE='
debug "liblock" "+++ in unsynch code"
unlock_resources "lockfunction" "${FUNCNAME}/${__llSYNCH_LINE}"
unset __llSYNCH_LINE'
-
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 79bba2b..95e1220 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -5,7 +5,6 @@
## @param delimiter
## @param name of array to put it in
##
-## @Description
## Turns a string into an array. Each element of the array
## is separated in the string by the delimiter.
##
@@ -63,24 +62,26 @@ function real_sedit() {
#---------------------------------------------------------------------
## @Type API
## @param string to check
+## @return 0 if true
+## @return 1 if false
##
## Argument is a string to check if the string contains all digits or
## not
#--------------------------------------------------------------------
function isdigit() {
- echo $1 | grep '[[:digit:]]+' >> /dev/null 2>&1 &&
- return 0
+ echo $1 | grep '[[:digit:]]+' >> /dev/null 2>&1
}

#--------------------------------------------------------------------
## @Type API
## @param string to check
+## @return 0 if true
+## @return 1 if false
##
-## Argumtemt is a string to check if it contains all chars a-zA-Z
+## Argument is a string to check if it contains all chars a-zA-Z
#--------------------------------------------------------------------
function isalpha() {
- echo $1 | grep '[[:alpha:]]+' >> /dev/null 2>&1 &&
- return 0
+ echo $1 | grep '[[:alpha:]]+' >> /dev/null 2>&1
}

#---------------------------------------------------------------------
@@ -776,8 +777,7 @@ function real_persistent_clear () {
## @param return variable (optional)
##
## @return 1 option is not present in the config
-## @return 0 option is present in the config (even if the option is
-## empty string "") and it's set.
+## @return 0 option is present in the config (even if the option is empty
string "") and it's set.
##
## Retrieves setting from $SPELL_CONFIG file and optionally sets user
## supplied variable. Function is here to make possible changes to
@@ -785,13 +785,6 @@ function real_persistent_clear () {
## function and are not working with variables directly
##
#---------------------------------------------------------------------
-#function config_get_option {
-# local VAR=$2
-# local REPLY=`grep -E "^$1=" $SPELL_CONFIG | head -n 1 | sed
"s/^[^=]*=//"`
-# [ -n "$VAR" ] && eval $VAR=\"$REPLY\"
-# [ -z "$REPLY" ] && return 1
-# return 0
-#}
function config_get_option () {
if [[ $PROTECT_SORCERY ]] ; then
if is_sorcery_var $1; then
@@ -811,13 +804,19 @@ function config_get_option () {
return 1
fi
}
+#function config_get_option {
+# local VAR=$2
+# local REPLY=`grep -E "^$1=" $SPELL_CONFIG | head -n 1 | sed
"s/^[^=]*=//"`
+# [ -n "$VAR" ] && eval $VAR=\"$REPLY\"
+# [ -z "$REPLY" ] && return 1
+# return 0
+#}

#---------------------------------------------------------------------
## @param Name of variable
## @param return variable
##
-## @return 0 if the variable could be found, 1 if no old persistent file
-## exists.
+## @return 0 if the variable could be found, 1 if no old persistent file
exists.
##
## Get value of a persistent variable from the previous cast when
## there is a -r. The persistent data moves to a seperate directory
@@ -870,14 +869,13 @@ function config_get_last_option() {
## working with variables directly
##
#---------------------------------------------------------------------
-#function config_set_option {
-# echo "$1=$2" >> $SPELL_CONFIG
-#}
function config_set_option () {
persistent_add $1
eval "$1=\"$2\""
}
-
+#function config_set_option {
+# echo "$1=$2" >> $SPELL_CONFIG
+#}

#---------------------------------------------------------------------
## @param config file variable
@@ -1267,8 +1265,8 @@ function is_sorcery_var() {

#---------------------------------------------------------------------
## @param Variable name used in complaint
-## @stdout Complain vehemently that a variable name is used by sorcery
-## and the user should file a bug because a spell is using the variable
+## @stdout Complain vehemently that a variable name is used by sorcery and
+## @stdout the user should file a bug because a spell is using the variable
#---------------------------------------------------------------------
function complain_sorcery_var() {
message "${PROBLEM_COLOR}WARNING: ATTEMPTING TO USE" \
@@ -1287,10 +1285,11 @@ function complain_sorcery_var() {
## SMGL_COMPAT_ARCHS is an array that holds architectures which are
compatible
## with the desired architecture. The desired architecture is determined as
## follows:
+## <pre>
## 1) If function is gien an argument, the argument is used, or
## 2) If cross-install is on, the TARGET architecture is used, or
## 3) The local ARCHITECTURE is used
-##
+## </pre>
## The least specific arch is in SMGL_COMPAT_ARCHS[0],
## SMGL_COMPAT_ARCHS[1] is more specific, et cetera. For example:
## desired architecture="athlon-xp" might result in:
@@ -1386,7 +1385,7 @@ function define_functions() {
## Set variable by name, useful for setting variables that were passed
## by reference.
## Example:
-##
+## <pre>
## function uber() {
## local x
## unter x 5
@@ -1397,7 +1396,7 @@ function define_functions() {
## read -p "enter value (default $2)" y
## upvar $var $y
## }
-##
+## </pre>
#---------------------------------------------------------------------
function upvar() {
# This makes eval see things as name=$2,
@@ -1414,7 +1413,7 @@ function awkuniq() {
}

#---------------------------------------------------------------------
-# Dirname written in bash, optionally uses an upvar (making it forkless).
+## Dirname written in bash, optionally uses an upvar (making it forkless).
#---------------------------------------------------------------------
function smgl_dirname() {
local __dir=$1
@@ -1451,8 +1450,8 @@ function smgl_dirname() {
}

#---------------------------------------------------------------------
-# basename written in bash, optionally uses upvar (making it forkless).
-# Does not have ability to remove file extension like the real basename.
+## basename written in bash, optionally uses upvar (making it forkless).
+## Does not have ability to remove file extension like the real basename.
#---------------------------------------------------------------------
function smgl_basename() {
local __base=$1
diff --git a/var/lib/sorcery/modules/libresurrect
b/var/lib/sorcery/modules/libresurrect
index d9a3921..823d434 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -29,44 +29,44 @@ function can_resurrect() {
}

#------------------------------------------------------------------------
-# @param spell
-# @param version
-#
-# High level overview:
-#
-# ensure theres a cache tarball
-#
-# unpack the tarball somewhere
-#
-# if the spell is installed backup everything
-#
-# split the files into three categories: state data, config files, regular
files
-# this can be roughly viewed as (its slightly more complicated)
-# state data is data owned by sorcery (/var/state)
-# config files are defined in the /var/lib/sorcery/configs file
-# things not in the above categories are regular files
-#
-# copy regular files onto the system
-# copy config files carefully (dont trample on user changes)
-# if the file does not exist, just copy the new one
-# elif the file exists and is identical to the new one, do nothing
-# else the file exists and differs from the new one then
-# if it is owned by the old spell with a valid md5
-# replace the file
-# elif it is owned by the old spell with an invalid md5 (admin changed
it)
-# ask if the user wants to change it
-# else the file might be owned by another spell, or might be an alien
-# ask if the user wants to change it
-#
-# if the spell was installed
-# remove regular files unique to the old spell
-# remove unchanged config files
-# ask about changed config files
-#
-# update state data
-# call it a day
-#
-# FIXME: some of the informative message calls might work better as debug
messages
+## @param spell
+## @param version
+##
+## High level overview:
+##
+## ensure theres a cache tarball
+##
+## unpack the tarball somewhere
+##
+## if the spell is installed backup everything
+##
+## split the files into three categories: state data, config files, regular
files
+## this can be roughly viewed as (its slightly more complicated)
+## state data is data owned by sorcery (/var/state)
+## config files are defined in the /var/lib/sorcery/configs file
+## things not in the above categories are regular files
+##
+## copy regular files onto the system
+## copy config files carefully (dont trample on user changes)
+## if the file does not exist, just copy the new one
+## elif the file exists and is identical to the new one, do nothing
+## else the file exists and differs from the new one then
+## if it is owned by the old spell with a valid md5
+## replace the file
+## elif it is owned by the old spell with an invalid md5 (admin changed
it)
+## ask if the user wants to change it
+## else the file might be owned by another spell, or might be an alien
+## ask if the user wants to change it
+##
+## if the spell was installed
+## remove regular files unique to the old spell
+## remove unchanged config files
+## ask about changed config files
+##
+## update state data
+## call it a day
+##
+## FIXME: some of the informative message calls might work better as debug
messages
#------------------------------------------------------------------------
function resurrect() { (
debug "libresurrect" "resurrect - $*"
@@ -403,8 +403,7 @@ function resurrect_sub() {
#------------------------------------------------------------------------
## @param from File we might want to install
## @param to File to replace
-## @param savetime Backup time if necessary (optional, defaults to
-## $(date +'%Y%m%d%H%M')
+## @param savetime Backup time if necessary (optional, defaults to $(date
+'%Y%m%d%H%M')
#------------------------------------------------------------------------
function real_install_config_file() {
if [[ ! $1 ]] || [[ ! $2 ]] ; then
@@ -433,8 +432,7 @@ function real_install_config_file() {
## @param from File we might want to install
## @param to File to replace
## @param savetime Backup time if necessary
-## @param md5_log MD5 log for previous version of the spell,
-# must be in root form
+## @param md5_log MD5 log for previous version of the spell, must be
in root form
#------------------------------------------------------------------------
function internal_install_config_file() {
local from=$1
diff --git a/var/lib/sorcery/modules/libspell
b/var/lib/sorcery/modules/libspell
index f708e92..71e988f 100644
--- a/var/lib/sorcery/modules/libspell
+++ b/var/lib/sorcery/modules/libspell
@@ -206,4 +206,3 @@ function run_spell_file() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#------------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/libstate
b/var/lib/sorcery/modules/libstate
index cbcc5c8..dafec00 100755
--- a/var/lib/sorcery/modules/libstate
+++ b/var/lib/sorcery/modules/libstate
@@ -361,22 +361,22 @@ function remove_sub_depends() {
}

#---------------------------------------------------------------------
-# Default depends and default provider api
-# default depends examples:
-#
-# default xfree86 provider to ImageMagick is xfree86
-# ImageMagick:X11-LIBS:xfree86
-#
-# default answer to optional_depends graphviz for ImageMagick is "no"
-# ImageMagick:graphviz:off
-#
-#
-# default provider examples:
-# use xorg as X11-LIBS even if its optional
-# xorg:X11-LIBS:on
-#
-# use xfree86 as X11-LIBS unless the [none] option exists (and use that
instead)
-# xfree86:X11-LIBS:off
+## Default depends and default provider api
+## default depends examples:
+##
+## default xfree86 provider to ImageMagick is xfree86
+## ImageMagick:X11-LIBS:xfree86
+##
+## default answer to optional_depends graphviz for ImageMagick is "no"
+## ImageMagick:graphviz:off
+##
+##
+## default provider examples:
+## use xorg as X11-LIBS even if its optional
+## xorg:X11-LIBS:on
+##
+## use xfree86 as X11-LIBS unless the [none] option exists (and use that
instead)
+## xfree86:X11-LIBS:off
#---------------------------------------------------------------------

#---------------------------------------------------------------------
@@ -602,8 +602,7 @@ function search_spell_status() {
#---------------------------------------------------------------------
##
## @param spell ( [A-Za-z0-9_-] )
-## @param version (optional and may not contain spaces or colons,
-## '.' and '*' have special meaning)
+## @param version (optional and may not contain spaces or colons; '.' and
'*' have special meaning)
## @param variable to set
## @Stdout last matching line ( only one even if there are more )
##
@@ -611,8 +610,8 @@ function search_spell_status() {
## a version.
##
## Prints out the matching spell's status
-## Returns 1 only for critical problems ( missing SPELL_STATUS file )
-## 0 for all other cases ( even when spell is not found )
+## @return 1 only for critical problems ( missing SPELL_STATUS file )
+## @return 0 for all other cases ( even when spell is not found )
##
#---------------------------------------------------------------------
function query_spell_status()
@@ -692,9 +691,7 @@ function real_provider_ok() {
## @Type API
## @param Spell name
## @param Provider name
-## @param If empty get the uncommited spell info, if anything else get
-## info from the committed ($DEPENDS_STATUS) database. If the uncommited
-## db doesnt exist (maybe we're not casting) use DEPENDS_STATUS
+## @param If empty get the uncommited spell info, if anything else get info
from the committed ($DEPENDS_STATUS) database. If the uncommited db doesnt
exist (maybe we're not casting) use DEPENDS_STATUS
##
## @return 0 if a provider could be found 1 if not
## @return 0 if a dependency from $1 on $2 is enabled, 1 otherwise.
@@ -716,9 +713,7 @@ function real_get_spell_provider() {
## @Type API
## @param Spell name
## @param Target spell name
-## @param If empty get the uncommited spell info, if anything else get
-## info from the committed ($DEPENDS_STATUS) database. If the uncommited
-## db doesnt exist (maybe we're not casting) use DEPENDS_STATUS
+## @param If empty get the uncommited spell info, if anything else get info
from the committed ($DEPENDS_STATUS) database. If the uncommited db doesnt
exist (maybe we're not casting) use DEPENDS_STATUS
##
## @return 0 if a dependency from $1 on $2 is enabled, 1 otherwise.
## @stdout the provider name(s)
diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 7902c3c..794523e 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -2,7 +2,7 @@
#---------------------------------------------------------------------
## @Synopsis Functions for dealing with tablet
## @Copyright (C) 2004 The Source Mage Team <http://www.sourcemage.org>
-##
+## <pre>
## tablet layout version 0:
## layout 0 is anything unversioned with all its problems, if a
## tablet like this is seen it should be updated to version 1,
@@ -43,7 +43,6 @@
## tablet_0_repair_spell DONE
## no tb_version : tablet_0_repair (bumps to version 1)
##
-#---------------------------------------------------------------------
##
## Terminology:
## "the tablet" the directory $TABLET_PATH and everything in it
@@ -81,11 +80,7 @@
## tablet_coalesce_files : hardlink identical files to save space
## tablet_fix_duplicates
## determine if a tablet points back at itself through the install log
-##
-##
-##
-##
-##
+## </pre>
#---------------------------------------------------------------------


@@ -367,18 +362,18 @@ function tablet_get_path() {
}

#----------------------------------------------------------------------
-# @param spell name
-# @param upvar
-# @param timestamp (optional)
-#
-# @global TABLET_IGNORE if set means that there isnt a tablet for this
-# and somewhere up the stack knows this
-# @global TABLET_SPELL_DIR if set, is the value of the tablet for this
-# spell, because somewhere up the stack it was just created (so dont bother
-# looking for it)
-#
-# the idea for the two globals is to simplify the layers in-between
-# and skip searching when it isn't necessary
+## @param spell name
+## @param upvar
+## @param timestamp (optional)
+##
+## @global TABLET_IGNORE if set means that there isnt a tablet for this
+## @global and somewhere up the stack knows this<br />
+## @global TABLET_SPELL_DIR if set, is the value of the tablet for this
+## @global spell, because somewhere up the stack it was just created (so
dont bother
+## @global looking for it)
+##
+## the idea for the two globals is to simplify the layers in-between
+## and skip searching when it isn't necessary
#----------------------------------------------------------------------
function tablet_find_spell_dir() {
[[ $TABLET_IGNORE ]] && return 1
@@ -425,10 +420,10 @@ function tablet_find_spell_dir() {
}

#----------------------------------------------------------------------
-# @param spell name
-# @param upvar
-# quicker dirtier version of above without special checks since the
-# tablet in a cache tarball has nothing to do with the installed system
+## @param spell name
+## @param upvar
+## quicker dirtier version of above without special checks since the
+## tablet in a cache tarball has nothing to do with the installed system
#----------------------------------------------------------------------
function tablet_find_resurrect_dir() {
local SPELL=$1
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 7eddc8f..c9a2aa9 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -337,8 +337,7 @@ function check_if_modified() {
## Creates a bzip/gzip'ed tar file containing an archived backup of
## file specified on standard input into $CACHE_COMP
## @stdin files, one per line, to put into the archive
-## @param directory input files are relative to install root for regular
-## files state root for state files
+## @param directory input files are relative to install root for regular
files state root for state files
##
#---------------------------------------------------------------------
function create_cache_archive() {
@@ -377,8 +376,8 @@ function create_cache_archive() {
}

#---------------------------------------------------------------------
-# this is to filter the install log from one form to another
-# for install_root/track_root conversions
+## this is to filter the install log from one form to another
+## for install_root/track_root conversions
#---------------------------------------------------------------------
function install_log_filter() {
sed "s:^$1:$2:"
@@ -388,40 +387,37 @@ function md5_log_filter() {
}

#---------------------------------------------------------------------
-# @param input file (can be /dev/stdin)
-# @param output file (can be /dev/stdout)
-# @param input format (root/log/filterable)
-# @param output format (root/log/filterable)
-# @param filter callback (optional install_log_filter, could be
-# md5_log_filter)
-#
-# This filters an install log from a given format into another format
-#
-# root: relative to / all paths are relative to / file existence tests
-# should work, INSTALL_ROOT and STATE_ROOT are prepended to data and
-# state files respectively
-#
-# log: relative to track_root etc, format used in the logs (see note on
-# special behavior below)
-#
-# filterable: track_root/install_root/state_root stripped out files can
-# have filters applied to them
-#
-# "Special" handling applies depending on whether STATE_ROOT is inside
-# or outside INSTALL_ROOT.
-# For converting into log format:
-# If STATE_ROOT is within INSTALL_ROOT
-# eg: STATE_ROOT=/opt/stuff INSTALL_ROOT=/opt/stuff
-# or STATE_ROOT=/opt/stuff/state INSTALL_ROOT=/opt/stuff
-# the portion of INSTALL_ROOT within STATE_ROOT is replaced with TRACK_ROOT
-# if STATE_ROOT is outside of INSTALL_ROOT (eg /opt/stuff and /opt/state)
-# then STATE_ROOT is left as is
-#
-# Converting from log to root format is the inverse, and of course going
-# to filterable format just requires removing whatever the expected prefix
is.
-#
-#
-#
+## @param input file (can be /dev/stdin)
+## @param output file (can be /dev/stdout)
+## @param input format (root/log/filterable)
+## @param output format (root/log/filterable)
+## @param filter callback (optional install_log_filter, could be
md5_log_filter)
+##
+## This filters an install log from a given format into another format
+## <pre>
+## root: relative to / all paths are relative to / file existence tests
+## should work, INSTALL_ROOT and STATE_ROOT are prepended to data and
+## state files respectively
+##
+## log: relative to track_root etc, format used in the logs (see note on
+## special behavior below)
+##
+## filterable: track_root/install_root/state_root stripped out files can
+## have filters applied to them
+##
+## "Special" handling applies depending on whether STATE_ROOT is inside
+## or outside INSTALL_ROOT.
+## For converting into log format:
+## If STATE_ROOT is within INSTALL_ROOT
+## eg: STATE_ROOT=/opt/stuff INSTALL_ROOT=/opt/stuff
+## or STATE_ROOT=/opt/stuff/state INSTALL_ROOT=/opt/stuff
+## the portion of INSTALL_ROOT within STATE_ROOT is replaced with TRACK_ROOT
+## if STATE_ROOT is outside of INSTALL_ROOT (eg /opt/stuff and /opt/state)
+## then STATE_ROOT is left as is
+##
+## Converting from log to root format is the inverse, and of course going
+## to filterable format just requires removing whatever the expected prefix
is.
+## </pre>
#---------------------------------------------------------------------
function log_adjuster() {
local input=$1
@@ -517,11 +513,9 @@ function log_adjuster() {
## Split a log file into data that should be TRACK_ROOT'd versus
## STATE_ROOT'd.
##
-## @param filename or - (or /dev/stdin) for a pipe. This routine will
-## read the input only once in-order to work with pipes.
+## @param filename or - (or /dev/stdin) for a pipe. This routine will read
the input only once in-order to work with pipes.
## @param filename for non-state files, possibly /dev/stdout or /dev/stderr
-## @param filename for state files, possibly /dev/stdout or /dev/stderr
-## don't use the same stream for both types.
+## @param filename for state files, possibly /dev/stdout or /dev/stderr
don't use the same stream for both types.
##
#---------------------------------------------------------------------
function seperate_state_files() {
diff --git a/var/lib/sorcery/modules/liburl b/var/lib/sorcery/modules/liburl
index 906a541..7b6199d 100755
--- a/var/lib/sorcery/modules/liburl
+++ b/var/lib/sorcery/modules/liburl
@@ -54,7 +54,7 @@
## The next step is to write the actual functions that
## will handle url requests and put them in the new file you just
## created. The functions that must be implemented are:
-##
+## <pre>
## url_<URL_PREFIX>_bucketize <url>
## url_<URL_PREFIX>_crack <url>
## url_<URL_PREFIX>_expand <url>
@@ -62,7 +62,7 @@
## url_<URL_PREFIX>_is_valid <url>
## url_<URL_PREFIX>_netselect <url>
## url_<URL_PREFIX>_verify <url>
-##
+## </pre>
## The easiest way to figure out what to do is to look at
## one of the existing files (e.g., url_http handles http requests).
##
@@ -77,11 +77,9 @@
##
#---------------------------------------------------------------------

-#---------------------------------------------------------------------
# Load library files (url_*) that contain url handlers
#
# (2002/09/29) added if so it only loads the stuff once
-#---------------------------------------------------------------------
if ! [[ $URL_HANDLER_FILES ]] ; then
URL_HANDLER_FILES=`ls $SGL_LIBRARY_MODULES/url_handlers/url_*[^~]`
for url_handler_file in $URL_HANDLER_FILES; do
@@ -141,15 +139,11 @@ function url_download_expand_sort() {
}

#---------------------------------------------------------------------
-## @param target Expected target file or tree, this is only a
-## suggestion, and the download handler may ignore it.
+## @param target Expected target file or tree, this is only a
suggestion, and the download handler may ignore it.
## @param url_list List of urls to get the target from
-## @param hints Hints, these help the function determine what
-## type of thing it is downloading or other tunables.
-## @param udl_target Name of variable in which to store the name of the
-## result directory or file
-## @param udl_type Name of the variable in which to store the type of
-## thing downloaded
+## @param hints Hints, these help the function determine what type
of thing it is downloading or other tunables.
+## @param udl_target Name of variable in which to store the name of the
result directory or file
+## @param udl_type Name of the variable in which to store the type of
thing downloaded
##
## @return 0 if file could be downloaded
## @return 1 otherwise
diff --git a/var/lib/sorcery/modules/url_handlers/url_cvs
b/var/lib/sorcery/modules/url_handlers/url_cvs
index c92ddf9..b8dd995 100755
--- a/var/lib/sorcery/modules/url_handlers/url_cvs
+++ b/var/lib/sorcery/modules/url_handlers/url_cvs
@@ -156,4 +156,3 @@ function url_cvs_netselect() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/url_handlers/url_dir
b/var/lib/sorcery/modules/url_handlers/url_dir
index 6625d51..498aa31 100755
--- a/var/lib/sorcery/modules/url_handlers/url_dir
+++ b/var/lib/sorcery/modules/url_handlers/url_dir
@@ -70,4 +70,3 @@ function url_dir_verify() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/url_handlers/url_file
b/var/lib/sorcery/modules/url_handlers/url_file
index 77e3c47..aec1488 100755
--- a/var/lib/sorcery/modules/url_handlers/url_file
+++ b/var/lib/sorcery/modules/url_handlers/url_file
@@ -49,4 +49,3 @@ function url_file_verify() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/url_handlers/url_http
b/var/lib/sorcery/modules/url_handlers/url_http
index c1740ed..ff6381d 100755
--- a/var/lib/sorcery/modules/url_handlers/url_http
+++ b/var/lib/sorcery/modules/url_handlers/url_http
@@ -81,12 +81,12 @@ function url_https_verify() {
## Verifies the specified ftp url. Echos results of wget if file
## is not found.
##
-#
-# Implementation note: wget --spider still downloads ftp files in
-# full rather than just checking that the file is there. To get
-# around this problem, we download the directory and see if the file
-# is in the directory listing.
-#
+##
+## @Implementation_note wget --spider still downloads ftp files in full
rather
+## @Implementation_note than just checking that the file is there. To get
+## @Implementation_note around this problem, we download the directory and
see
+## @Implementation_note if the file is in the directory listing.
+##
#---------------------------------------------------------------------
function url_ftp_verify() {
local URL=$1
diff --git a/var/lib/sorcery/modules/url_handlers/url_rsync
b/var/lib/sorcery/modules/url_handlers/url_rsync
index 7c74dc4..7f071bc 100755
--- a/var/lib/sorcery/modules/url_handlers/url_rsync
+++ b/var/lib/sorcery/modules/url_handlers/url_rsync
@@ -97,4 +97,3 @@ function url_rsync_netselect() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/subroutines b/var/lib/sorcery/subroutines
index 21fcdea..4d2ed21 100755
--- a/var/lib/sorcery/subroutines
+++ b/var/lib/sorcery/subroutines
@@ -47,4 +47,3 @@ done
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (06b0376f193662002b0c2b18b237df55398fb957), Jaka Kranjc, 02/04/2008

Archive powered by MHonArc 2.6.24.

Top of Page