Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Andrew Stitt (0ca11811fc2b6af08dd021f939018c1f279caeee)

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 master sorcery by Andrew Stitt (0ca11811fc2b6af08dd021f939018c1f279caeee)
  • Date: Mon, 26 Jun 2006 10:50:43 -0500

GIT changes to master sorcery by Andrew Stitt <astitt AT sourcemage.org>:

ChangeLog | 13 +++++++++++++
usr/sbin/cast | 27 +++++++++++----------------
usr/sbin/dispel | 2 +-
usr/sbin/gaze | 29 ++++++++++++-----------------
usr/share/man/man1/gaze.1 | 4 ----
usr/share/man/man8/cast.8 | 2 --
var/lib/sorcery/modules/libapi | 1 -
var/lib/sorcery/modules/libcodex | 10 +++++++---
var/lib/sorcery/modules/libdepends | 28 ++++++++++++++++------------
var/lib/sorcery/modules/libsorcery | 31 -------------------------------
10 files changed, 60 insertions(+), 87 deletions(-)

New commits:
commit 0ca11811fc2b6af08dd021f939018c1f279caeee
Merge: 2c9b9f47db1868000fcd2f14a4b4b7adf6cd7d5a
ecec7ab09a42c23e4ede12c6d9dd2c9affaec8d8
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

Merge branch 'master' of
ssh://astitt AT scm.sourcemage.org/srv/scm/smgl/sorcery

Conflicts:

ChangeLog

commit 2c9b9f47db1868000fcd2f14a4b4b7adf6cd7d5a
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12671, typo in gaze patchlevels

commit 84395092ec9d71b8a8e711adcbb42d3db3420788
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12670, patch from Jaka Kranjc, gaze patchlevels doesnt work with
uninstalled spells.

commit 1a895865f8a2cffed5dd8ddd77c23889cdf5bc72
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12669, codex_does_spell_exist wasnt handling no or empty string
parameters

commit 981219f332e71752f1e078031a435fff357bb3a3
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12667, use xargs in case there are too many install logs

commit f4533ca4cec8d7fd864850b43c118f5235b24f79
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12664, gaze dependencies now handles -sub syntax

commit 66a03f5388895ee31c3b62584d8b0142d63917ed
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12638, fix wording in dispel

commit 230e693dcfc5cbc55fd227e1e5d84afda49a523d
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 11853, minor spelling fixes, also remove ancient pam specific
stuff

commit f37a3845d5d681d1c6863af282eb3366ff8e021d
Merge: 8a15f3839f2acbdfde6f6facd864e4f6d1f6590e
8e2692fc71d86671ffe5dd56f336dfd36721a00e
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

Merge branch 'master' into 12233

commit 8a15f3839f2acbdfde6f6facd864e4f6d1f6590e
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

try to fix all the list searching greps. Translate spaces to newlines
so we can just use grep -x.

diff --git a/ChangeLog b/ChangeLog
index 198c4bc..4db0238 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-06-26 Andrew Stitt <astitt AT sourcemage.org>
+ * cast: spelling fixes for bug 11853
+ * cast, gaze, cast.1, gaze.1, libsorcery: remove pam stuff
+ * dispel: fix bug 12638, fix wording for recasting without
+ missing optionals
+ * gaze: fix bug 12664, make gaze dependencies handle -sub syntax
+ * gaze: fix bug 12667, use xargs in case there are too many install
logs
+ * libcodex: fix bug 12669, handle the case where no parameters
+ or empty parameters are passed to codex_does_spell_exist
+ * gaze: fix bug 12670, gaze patchlevels couldn't handle uninstalled
+ spells, patch from Jaka Kranjc.
+ * gaze: fix bug 12671, typo in gaze patchlevels
+
2006-06-25 David Brown <dmlb2000 AT gmail.com>
* build_api/api1: removed calls to prepare and destroy stage
root since we patched install watch they aren't needed
diff --git a/usr/sbin/cast b/usr/sbin/cast
index 2af1d99..7ea72a8 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -21,10 +21,10 @@ Usage: cast [parameters] [s

Optional Parameters:

- --cflags Custom CFLAGS
- --cxxflags Custom CXXFLAGS
- --cppflags Custom CPPFLAGS
- --ldflags Custom LDFLAGS
+ --cflags "flags" Custom CFLAGS
+ --cxxflags "flags" Custom CXXFLAGS
+ --cppflags "flags" Custom CPPFLAGS
+ --ldflags "flags" Custom LDFLAGS
--no-opts Turn off setting optimization flags, except
for those found in --cflags, --cxxflags,
--cppflags and --ldflags.
@@ -38,7 +38,7 @@ Optional Parameters:
--deps Configure spells and determine dependencies,
only cast dependencies, not spells themselves

--c | --compile Recompile the spells (dont install from
cache).
+-c | --compile Recompile the spells (don't install from
cache).
-r | --reconfigure Select new dependencies for spells (implies
-c)

-g | --grimoire [...] Use only the specified grimoires for this
cast
@@ -59,7 +59,7 @@ Optional Parameters:
dependencies are disabled, ask to recast
the dependee. Optional parameter can be
option can be one of: "always", "ask-yes",
- "ask-no", or "ignore", it defaults to what
+ "ask-no", or "ignore"; it defaults to what
is set via the sorcery menu.

-Z | --lazy-updates [option] Perform updates on installed spells that
@@ -71,10 +71,7 @@ Optional Parameters:
--from directory Specify an alternate for $SOURCE_CACHE
--url URL Specify an alternate download URL

- --pam Re-casts all installed spells that
- can use Linux-PAM
-
- --queue Casts all spells listed in $INSTALL_QUEUE
+ --queue Cast all spells listed in $INSTALL_QUEUE

EOF

@@ -122,7 +119,6 @@ function process_parameters() {
--silent) SILENT="$1"; shift 1
;;
-s) export SEPARATE="$1"; shift 1
;;
--url) export BASE_URL="$2"; shift 2
;;
- --pam) cast -c `find_pam_aware` ; shift 1
;;
--queue) CAST_QUEUE=yes ; COMPILE=$1; shift 1
;;
*) help ;;
esac
@@ -171,7 +167,6 @@ function strip_parameters() {
-d|--download) shift 1 ;;
-s) shift 1 ;;
--url) shift 2 ;;
- --pam) shift 1 ;;
--queue) shift 1 ;;
*) shift 1 ;;

@@ -414,7 +409,7 @@ function pass_two() {
return 1
fi

- rm -f $TMP_DIR/pass_three.done # dont return until this file exists
+ rm -f $TMP_DIR/pass_three.done # don't return until this file exists
MINUS_K=yes
if [[ $SEPARATE ]] ; then
( CAST_PASS="three"
@@ -516,7 +511,7 @@ function pass_three() {
touch $download_log
fi

- # check if this is being resurrected and if so, dont summon
+ # check if this is being resurrected and if so, don't summon
# this will go away when resurrect support and dependency resolution merge
if ! [[ $COMPILE ]] ; then
VERSION=$(codex_set_current_spell_by_name $SPELL &> /dev/null;echo
$VERSION)
@@ -569,7 +564,7 @@ function pass_four() {
# hacky way to get the latest version
VERSION=$(codex_set_current_spell_by_name $SPELL &> /dev/null;echo
$VERSION)
if [[ ! $VERSION ]] ; then
- message "Cant find spell version for some reason, is $SPELL a spell?"
+ message "Can't find spell version for some reason, is $SPELL a spell?"
else
can_resurrect $SPELL $VERSION &> /dev/null && do_resurrect=yes
fi
@@ -629,7 +624,7 @@ function pass_five() {
message "$item"
done | column

- set_term_title "Casting successfull."
+ set_term_title "Casting successful."
message "${DEFAULT_COLOR}"

fi
diff --git a/usr/sbin/dispel b/usr/sbin/dispel
index 87cbb9a..1adee29 100755
--- a/usr/sbin/dispel
+++ b/usr/sbin/dispel
@@ -551,7 +551,7 @@ function dispel_depends_engine() {
dispel_parents_list_borkers $parent "$optional_borkers" \
"$runtime_borkers" "$suggested_borkers"
if [[ $optional_borkers ]] && dispel_parent_query \
- "Re-cast $parent without these non-optional depends?"
\
+ "Re-cast $parent without these optional depends?" \
"$RECAST_PARENT_DEFAULT" ; then
# fix up the abandoned depends data for impending recompile
# this is a bit of a hack but should work:
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 84856e1..f7601f3 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -80,10 +80,6 @@ newer last_cast Shows spells
voyeur [delay or spell]
Peeks into spell compilation.

-pam <empty> Displays installed or held spells that are
- linux-pam aware.
-
-
orphans <empty> Displays installed spells that no
installed
spells explicitly depend on.

@@ -242,7 +238,7 @@ function alien() {

[[ $GAZE_VERBOSE != 0 ]] &&
message "Discovering installed files..."
- { cat $SORCERY_INSTALL_LOG ; cat $INSTALL_LOGS/* ; } |
+ { cat $SORCERY_INSTALL_LOG ; find $INSTALL_LOGS/ -type f|xargs cat ; } |
files | sort > $TMP_DIR/gaze.known

[[ $GAZE_VERBOSE != 0 ]] &&
@@ -1146,19 +1142,20 @@ function gaze_show_patchlevels() {
fi

local TB_DIR
- tablet_find_spell_dir "$SPELL" TB_DIR

- local I_PATCH
- local I_SPATCH
- tablet_get_patchlevel "$TB_DIR" I_PATCH
- tablet_get_security_patch "$TB_DIR" I_SPATCH
+ local I_PATCH="-"
+ local I_SPATCH="-"
+ if tablet_find_spell_dir "$SPELL" TB_DIR; then
+ tablet_get_patchlevel "$TB_DIR" I_PATCH
+ tablet_get_security_patch "$TB_DIR" I_SPATCH
+ fi


local ECHO_INSTALLED=1
(

echo "Grimoire|Spell|Grimoire |Grimoire |Installed |Installed"
- echo " | |Regula |Security |Regular |Security"
+ echo " | |Regular |Security |Regular |Security"
echo " | |Patchlevel|Patchlevel|Patchlevel|Patchlevel"
echo "--------|-----|----------|----------|----------|----------"

@@ -1509,23 +1506,23 @@ function gaze_show_dependencies() {
return 0
}
depends() {
+ [[ $1 == -sub ]] && shift 2
recurse "$1" $DEPTH "depends"
return 0
}
optional_depends() {
+ [[ $1 == -sub ]] && shift 2
[[ $NO_OPTIONALS ]] ||
recurse "$1" $DEPTH "optional"
return 0
}
- requires() {
- recurse "$1" $DEPTH "requires"
- return 0
- }
runtime_depends() {
+ [[ $1 == -sub ]] && shift 2
recurse "$1" $DEPTH "runtime"
return 0
}
suggest_depends() {
+ [[ $1 == -sub ]] && shift 2
recurse "$1" $DEPTH "suggest"
return 0
}
@@ -2047,8 +2044,6 @@ parse() {

voyeur) shift 1; gaze_activate_voyeur $@ ;;

- pam) find_pam_aware ;;
-
install-queue) if [[ -s $INSTALL_QUEUE ]]; then
$PAGER $INSTALL_QUEUE
else
diff --git a/usr/share/man/man1/gaze.1 b/usr/share/man/man1/gaze.1
index f9bf3e3..ab32fd4 100644
--- a/usr/share/man/man1/gaze.1
+++ b/usr/share/man/man1/gaze.1
@@ -40,10 +40,6 @@ versions. This does not delete sources t
NOTE: This is deprecated. Use
.I cleanse --sweep
.PP
-.SS pam
-.IP
-display spells installed that are pam aware
-.PP
.SS orphans
.IP
display installed spells that have no explicit dependencies on them
diff --git a/usr/share/man/man8/cast.8 b/usr/share/man/man8/cast.8
index 9841f5f..aa5b074 100644
--- a/usr/share/man/man8/cast.8
+++ b/usr/share/man/man8/cast.8
@@ -53,8 +53,6 @@ NOTE: If there are any cross-grimoire de
Specify an alternate directory to search for cached sources.
An alternate to /var/spool/sorcery.
Usually though, you'd just copy the source to /var/spool/sorcery.
-.SS "--pam"
-re-casts all installed spells that can use linux-pam.
.SS "--queue"
re-casts all spells in the install queue, as generated for example by
.BI sorcery " queue"
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index 5b4ae54..dac27ea 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -68,7 +68,6 @@ # prepare_install (libgrimoire
# provider_ok (libstate)
# query (libmisc)
# query_string (libmisc)
-# requires (libdepends)
# runtime_depends (libdepends)
# rm_source_dir (libgrimoire)
# sedit (libmisc)
diff --git a/var/lib/sorcery/modules/libcodex
b/var/lib/sorcery/modules/libcodex
index 32c8be4..fc83edd 100755
--- a/var/lib/sorcery/modules/libcodex
+++ b/var/lib/sorcery/modules/libcodex
@@ -462,10 +462,14 @@ #---------------------------------------
function codex_does_spell_exist() {
local i
local retValue=0
- for i in $* ; do
- if ! [[ `codex_find_spell_by_name $i` ]] ; then
+ [[ "$#" -lt 1 ]] && return 1
+ for i in "$@" ; do
+ if [[ "$i" == "" ]] ; then
+ message "${PROBLEM_COLOR}Empty string is not a spell!${DEFAULT_COLOR}"
+ retValue=1
+ elif ! [[ $(codex_find_spell_by_name "$i") ]] ; then
message "${SPELL_COLOR}$i${PROBLEM_COLOR} is not a
spell!${DEFAULT_COLOR}"
- retValue=1
+ retValue=1
fi
done
return $retValue
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index fb62b24..a41d153 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -409,7 +409,7 @@ function compute_uninstalled_depends()
local spell spells
spells=( $@ )

- PRETEND_NOT_INSTALLED=" $@ "
+ PRETEND_NOT_INSTALLED=$(echo "$@"|tr " " "\n")

local _idx

@@ -536,7 +536,7 @@ function private_should_cast()
# order is important here...
if ! codex_does_spell_exist $1; then
return 1
- elif echo "$PRETEND_NOT_INSTALLED" | grep -q " $1 " ; then
+ elif echo "$PRETEND_NOT_INSTALLED" | grep -x -q "$1" ; then
# always look at stuff on the command line unless its exiled
return 0
# from here on the spell was not on the command line...
@@ -932,20 +932,20 @@ function work_depends_provider()
# check if theres an abandoned answer, but only if its still a provider
if [[ ! $default ]] && [ -e $ABANDONED_DEPENDS/$SPELL ] ; then
tmp=$(search_depends_status $ABANDONED_DEPENDS/$SPELL "$SPELL"
".*($1)"|awk -F: '{print $2;exit}')
- [[ $tmp ]] && echo $CANDIDATES|grep -q "\<$tmp\>" && default=$tmp
+ [[ $tmp ]] && echo $CANDIDATES|grep -x -q "$tmp" && default=$tmp
fi

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

# check if we've already answered this question
if [[ ! $default ]]; then
for tmp in $CANDIDATES; do
- echo ${spells[@]} | grep -q "\<$tmp\>" && default=$tmp && break
+ echo ${spells[@]} | tr " " "\n"| grep -x -q "$tmp" && default=$tmp &&
break
done
fi

@@ -1037,7 +1037,7 @@ function work_optional_depends_provider(
# check if theres an abandoned answer, but only if its still a provider
if [[ ! $default ]] && [ -e $ABANDONED_DEPENDS/$SPELL ] ; then
tmp=$(search_depends_status_simple $ABANDONED_DEPENDS/$SPELL "$SPELL"
".*($1)" "on"|awk -F: '{print $2;exit}')
- if [[ $tmp ]] && echo $CANDIDATES|grep -q "\<$tmp\>" ; then
+ if [[ $tmp ]] && echo $CANDIDATES|grep -x -q "$tmp" ; then
default=$tmp
else
tmp=$(search_depends_status_simple $ABANDONED_DEPENDS/$SPELL "$SPELL"
".*($1)" "off")
@@ -1059,7 +1059,7 @@ function work_optional_depends_provider(
# if the user said "on" use the default rather than none
# unless theres something wrong with the provider they chose
# in which case fall back to none
- [[ $tmp ]] && echo $CANDIDATES|grep -q "\<$tmp\>" &&
+ [[ $tmp ]] && echo $CANDIDATES|grep -x -q "$tmp" &&
default=$tmp || default=none
else
default=none
@@ -1070,7 +1070,7 @@ function work_optional_depends_provider(
# check if we've already answered this question
if [[ ! $default ]]; then
for tmp in $CANDIDATES; do
- echo ${spells[@]} | grep -q "\<$tmp\>" && default=$tmp && break
+ echo ${spells[@]} | tr " " "\n" | grep -x -q "$tmp" && default=$tmp &&
break
done
fi

@@ -1177,7 +1177,7 @@ function work_optional_depends_spell()
if [[ ! $default ]]; then
debug "libdepends" "Checking in queue"
#\< and \> match the empty string at the start and end of a word
- echo ${spells[@]} | grep -q "\<$1\>" && default=on
+ echo ${spells[@]}|tr " " "\n" | grep -x -q "$1" && default=on
fi

# check if installed/held
@@ -1293,8 +1293,12 @@ function private_up_trigger() {
# this maps trigerees to triggerers
# cast_self:perl_module -> perl
hash_append trg_r_hash "$TARGET:$ACTION" " $SPELL "
- echo $NEW_DEPENDS | grep -q "$TARGET" ||
+
+ # afk 6-7-06 Im not sure this line is correct, it seems to only
+ # make a circular depends, instead we want $TARGET to depend on $SPELL
+ echo ${NEW_DEPENDS[@]} |tr " " "\n"| grep -x -q "$TARGET" ||
NEW_DEPENDS=( ${NEW_DEPENDS[*]} $spell)
+
triggerees=( ${triggerees[*]} $TARGET )
}

@@ -1348,7 +1352,7 @@ function real_sub_depends() {

# if didnt return above, then we know the sub-depends is not on the system
# so the spell must be (re)cast, check to see if we're allowed to do that
- if ! echo "$PRETEND_NOT_INSTALLED" | grep -q " $1 " &&
+ if ! echo "$PRETEND_NOT_INSTALLED" | grep -x -q "$1" &&
spell_held $sub_dependee; then
# spell is held and not explicitly requested, so we cant recast the
# spell with the sub-depends requested
@@ -1488,7 +1492,7 @@ function private_add_depends()
# force implied basesystem dependency in the depends tree
if [[ $FORCE_BASESYSTEM_DEPENDS == on ]] &&
[[ $SPELL != basesystem ]] &&
- ! echo $base_deps| grep -q $SPELL; then
+ ! echo $base_deps|grep -x -q "$SPELL"; then
hash_append "$CAST_HASH" "$SPELL" "basesystem"
hash_append "$BACK_CAST_HASH" "basesystem" "$SPELL"
fi
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 0e33b66..4525a31 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1233,37 +1233,6 @@ function boost() {


#---------------------------------------------------------------------
-## @Stdout spelllist
-## Returns a list of all installed spells that use linux-pam
-##
-## NOTE: this will become useless when triggers are introduced.
-##
-#---------------------------------------------------------------------
-function find_pam_aware() { (
-
- cat $SPELL_STATUS |
- while read LINE; do
-
- SPELL="`echo $LINE | cut -d : -f1`"
- STATUS="`echo $LINE | cut -d : -f3`"
-
- if [ "$STATUS" == "installed" ] ||
- [ "$STATUS" == "held" ]; then
-
- SPELL_DIRECTORY=`codex_find_spell_by_name $SPELL`
-
- if [ -d "$SPELL_DIRECTORY/pam.d" ] &&
- [ "$SPELL" != "linux-pam" ]
- then echo $SPELL
- fi
-
- fi
- done
-
-) }
-
-
-#---------------------------------------------------------------------
##
## Given a list of source files, returns true if each file exists.
##



  • [SM-Commit] GIT changes to master sorcery by Andrew Stitt (0ca11811fc2b6af08dd021f939018c1f279caeee), Andrew Stitt, 06/26/2006

Archive powered by MHonArc 2.6.24.

Top of Page