Skip to Content.
Sympa Menu

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

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 (9b27af65a1ec97aec25272e963d07baa9aa3c760)
  • Date: Mon, 3 Mar 2008 13:09:26 -0600

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

ChangeLog | 5 +++++
usr/sbin/cleanse | 22 ++++++++++++++++++----
2 files changed, 23 insertions(+), 4 deletions(-)

New commits:
commit 9b27af65a1ec97aec25272e963d07baa9aa3c760
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

cleanse: don't display cast/dispel commands if none are needed and print a
newline between each menu

commit bd46f08ca107d3475da06f2b3a45d8d7bedd89b5
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

cleanse: broken runtime providers don't need to be recast if switched

diff --git a/ChangeLog b/ChangeLog
index 0e32ba4..4a15f1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-03 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * cleanse: broken runtime providers don't need to be recast if
switched
+ don't display cast/dispel commands if none are needed and print a
+ newline between each menu
+
2008-02-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libmisc: fixed consolidate_params so it can take "-[eEn]" as values
too;
before they were passed to echo and ignored, breaking dispel -e
diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index a96c671..1f28127 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -346,7 +346,11 @@ function prune_depends()

if [[ ${provider} ]] ; then
message -n "$provider "
- options=( "Switch from $2 to ${provider} and recompile" )
+ if [[ $3 == suggest ]] || [[ $3 == runtime ]]; then
+ options=( "Switch from $2 to ${provider}" )
+ else
+ options=( "Switch from $2 to ${provider} and recompile" )
+ fi
else
message -n "${PROBLEM_COLOR}no one${DEFAULT_COLOR} "
fi
@@ -380,12 +384,15 @@ function prune_depends()
;;
S*) sed 's/^\('$1':\)'$2'\(('$4'):.*\)$/\1'$provider'\2/'
$DEPENDS_STATUS > $TMP_DIR/prune.1
mv $TMP_DIR/prune.1 $DEPENDS_STATUS
- echo $1 >>$TMP_DIR/prune.cast
+ if [[ $3 == required ]] || [[ $3 == optional ]]; then
+ echo $1 >>$TMP_DIR/prune.cast
+ fi
;;
*) message "We should never get here."
exit 1
;;
esac
+ echo
shift 4
done

@@ -398,9 +405,16 @@ function prune_depends()
[ -s $TMP_DIR/prune.cast ] &&
cast -c $( sort $TMP_DIR/prune.cast | uniq )
else
+ local prune_dispel prune_cast t
+ prune_dispel=$(sort -u $TMP_DIR/prune.dispel 2>/dev/null)
+ prune_cast=$(sort -u $TMP_DIR/prune.cast 2>/dev/null)
+ if [[ -z $prune_dispel$prune_cast ]]; then
+ message "Pruning done."
+ return 0
+ fi
t=$(date +%Y%m%d%s)
- echo dispel $( sort $TMP_DIR/prune.dispel 2>/dev/null | uniq ) >
$BACKUPDIR/prune.$t
- echo cast -c $( sort $TMP_DIR/prune.cast 2>/dev/null | uniq ) >>
$BACKUPDIR/prune.$t
+ echo dispel $prune_dispel > $BACKUPDIR/prune.$t
+ echo cast -c $prune_cast >> $BACKUPDIR/prune.$t
cat $BACKUPDIR/prune.$t
message "For future reference, lines are stored in $BACKUPDIR/prune.$t"
fi



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (9b27af65a1ec97aec25272e963d07baa9aa3c760), Jaka Kranjc, 03/03/2008

Archive powered by MHonArc 2.6.24.

Top of Page