Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel 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 devel sorcery by Andrew Stitt
  • Date: Sat, 3 Jun 2006 13:25:45 -0500

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

ChangeLog | 7 ++++
usr/sbin/gaze | 61
+++++++++++++++++++++++++++++++++++--
var/lib/sorcery/modules/libdepends | 21 +++++++++---
3 files changed, 82 insertions(+), 7 deletions(-)

New commits:
commit 51a6d3eea7609936c8162e0cd43b2a68fbed6d78
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

fix bug 12603, add special case handling for answers of no to optional
depends on providers

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

fix bug 11858, add gaze patchlevels sub-command

diff --git a/ChangeLog b/ChangeLog
index 1ca03c7..e0b4b45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-03 Andrew Stitt <astitt AT sourcemage.org>
+ * libdepends: fix bug 12603, optional depends on a provider does not
+ properly remember defaults of none.
+
+2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
+ * gaze: add patchlevels subcommand, bug 11858
+
2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
* cast: factor cast --queue code out of argument parsing, fixed bug
11740

diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 8c5d314..9bc38a3 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -39,7 +39,9 @@ install-spell spell Views an install l
installed [spell] Views installed spells.
version spell Views version of spell installed,
and version in the grimoire.
-versions spell Views version of spell in the in all grimoires
+versions spell Views version of spell in all grimoires
+patchlevels spell Views PATCHLEVEL and SECURITY_PATCH value
+ of spell in all grimoires
license spell Views the license of the given
spell(s)
license section Views the licenses of spells in the
given
section(s)
@@ -1128,6 +1130,60 @@ function gaze_show_versions() {
echo
}

+#---------------------------------------------------------------------
+##
+## Shows the all versions of spell, all versions in all grimoires and
+## the version installed on the system.
+## @param Spell
+##
+#---------------------------------------------------------------------
+function gaze_show_patchlevels() {
+
+ local SPELL=$1
+
+ if ! codex_does_spell_exist $SPELL
+ then return 1
+ 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 ECHO_INSTALLED=1
+ (
+
+ echo "Grimoire|Spell|Grimoire |Grimoire |Installed |Installed"
+ echo " | |Regula |Security |Regular |Security"
+ echo " | |Patchlevel|Patchlevel|Patchlevel|Patchlevel"
+ echo "--------|-----|----------|----------|----------|----------"
+
+ for GRIMOIRE in $(codex_get_all_grimoires)
+ do
+ if SPELL_DIRECTORY=$(codex_cache_spell_lookup $SPELL $GRIMOIRE)
+ then
+ codex_set_current_spell $SPELL_DIRECTORY
+
+ if [ $ECHO_INSTALLED -eq 1 ]; then
+ echo
"$GRIMOIRE_NAME|$SPELL|${PATCHLEVEL:-"0"}|${SECURITY_PATCH:-"0"}|${I_PATCH:-0}|${I_SPATCH:-0}"
+ ECHO_INSTALLED=0
+ else
+ echo
"$GRIMOIRE_NAME|$SPELL|${PATCHLEVEL:-0}|${SECURITY_PATCH:-0}|-|-"
+ fi
+
+ else
+ echo "$(basename $GRIMOIRE)|-|-|-|-|-"
+ fi
+ done
+
+ ) | maybe_column -t -s "|"
+
+ echo
+}


#---------------------------------------------------------------------
@@ -1959,7 +2015,8 @@ parse() {
import) import_snapshot $2 ;;
section) shift; gaze_show_section $@ ;;
version) shift; gaze_show_version $@ ;;
- versions) shift; gaze_show_versions $@ ;;
+ versions) shift; gaze_show_versions $@ ;;
+ patchlevels) shift; gaze_show_patchlevels $@ ;;
license) shift; gaze_show_license $@ ;;
alien) alien ;;
system-info) gaze_system_info ;;
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 186d8ef..6cee737 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -1019,19 +1019,30 @@ function work_optional_depends_provider(
local CANDIDATES=$( find_providers $1)
# if not reconfiguring check if theres already an answer in DEPENDS_STATUS
if [[ ! $RECONFIGURE ]]; then
- explode "$(search_depends_status $DEPENDS_STATUS "$SPELL" ".*($1)")" ":"
"status"
+ explode "$(search_depends_status_simple $DEPENDS_STATUS "$SPELL"
".*($1)" "on")" ":" "status"
local tmp=${status[1]%(*} # Name of spell which provides $1
- if spell_ok $tmp &&
+ if [[ "$tmp" ]] && spell_ok "$tmp" &&
query "Continue to use ${SPELL_COLOR}$tmp${DEFAULT_COLOR}?" y; then
private_common_depends "$tmp($1)" "on" "$database_term" "$2" "$3"
return 0
fi
+ if [[ "$(search_depends_status_simple $DEPENDS_STATUS \
+ "$SPELL" ".*($1)" "off")" ]] &&
+ query "Continue to use ${SPELL_COLOR}[none]${DEFAULT_COLOR}?" y; then
+ private_common_depends "$tmp($1)" "off" "$database_term" "$2" "$3"
+ return 0
+ fi
fi

# 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=$(search_depends_status_simple $ABANDONED_DEPENDS/$SPELL "$SPELL"
".*($1)" "on"|awk -F: '{print $2;exit}')
+ if [[ $tmp ]] && echo $CANDIDATES|grep -q "\<$tmp\>" ; then
+ default=$tmp
+ else
+ tmp=$(search_depends_status_simple $ABANDONED_DEPENDS/$SPELL "$SPELL"
".*($1)" "off")
+ [[ $tmp ]] && default=none
+ fi
fi

# check if theres a default provider
@@ -1526,7 +1537,7 @@ function depends_message() {
message -n " ${SPELL_COLOR}${3}${DEFAULT_COLOR}"
fi
if [[ $# -ge 4 ]] ; then
- message -n " ($4)"
+ message -n " $4"
fi
message ""
}



  • [SM-Commit] GIT changes to devel sorcery by Andrew Stitt, Andrew Stitt, 06/03/2006

Archive powered by MHonArc 2.6.24.

Top of Page