sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Ismael Luceno (8ba883b58d3cae86942313d690858462af63b52f)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (8ba883b58d3cae86942313d690858462af63b52f)
- Date: Sat, 10 Jan 2015 23:49:12 -0600
GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:
usr/sbin/cleanse | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 8ba883b58d3cae86942313d690858462af63b52f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
cleanse: prune_depends: Do not emit empty dispel or cast lists
commit 9fda969bdf5c68cf64efd05f60d66ddcbd368dd1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
cleanse: prune_depends: Fix gawkisms in code for parsing depends
diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index 77954a5..2e256dd 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -334,16 +334,19 @@ function prune_depends()
# Output is in the form "SPELL DEPENDENCY optional/reqired PROVIDER"
bad=( $( awk -F: -v status="$SPELL_STATUS" '
BEGIN {
- while (getline < status)
+ while (getline < status == 1)
Installed[$1]
}
$3 == "on" {
- prov = ($2 ~ "[(].*[)]") ?
- gensub("^.*\\((.*)\\).*$", "\\1", 1, $2) :
- "__BLANK__"
- gsub("\\(.*\\)", "", $2)
- if ($1 in Installed && !($2 in Installed) && $2 != "")
- printf("%s %s %s %s\n", $1, $2, $4, prov);
+ if (match($2, /[(][^):]*[)]/)) {
+ prov = substr($2, RSTART + 1, RLENGTH - 2)
+ dep = substr($2, 1, RSTART - 1)
+ } else {
+ prov = "__BLANK__"
+ dep = $2
+ }
+ if ($1 in Installed && dep != "" && !(dep in Installed))
+ print $1, dep, $4, prov
}' $DEPENDS_STATUS ) )
unlock_file $SPELL_STATUS
@@ -367,7 +370,6 @@ function prune_depends()
fi
done
-
if [[ ${provider} ]] ; then
message -n "$provider "
if [[ $3 == suggest ]] || [[ $3 == runtime ]]; then
@@ -437,8 +439,10 @@ function prune_depends()
return 0
fi
t=$(date +%Y%m%d%s)
- echo dispel $prune_dispel > $BACKUPDIR/prune.$t
- echo cast -c $prune_cast >> $BACKUPDIR/prune.$t
+ [ "$prune_dispel" ] &&
+ echo dispel $prune_dispel > $BACKUPDIR/prune.$t
+ [ "$prune_cast" ] &&
+ 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 Ismael Luceno (8ba883b58d3cae86942313d690858462af63b52f), Ismael Luceno, 01/11/2015
Archive powered by MHonArc 2.6.24.