Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Ismael Luceno (3392b6b661eba18be6a9d9d7cc77aa89e5b75479)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • 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 (3392b6b661eba18be6a9d9d7cc77aa89e5b75479)
  • Date: Tue, 18 Jul 2017 21:33:31 +0000

GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:

build | 2 +-
usr/sbin/cleanse | 8 ++------
usr/sbin/gaze | 32 +++++++++++++++++---------------
var/lib/sorcery/modules/libtablet | 14 +++++---------
4 files changed, 25 insertions(+), 31 deletions(-)

New commits:
commit 3392b6b661eba18be6a9d9d7cc77aa89e5b75479
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

cleanse: Simplify a couple of calculations

- TOTALNR in cleanse_fix()
- size in cleanse_fix_init_ldd_check()

commit 444ec7403ee2a8b1d89d18b65312223388e702e0
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libtablet: Simplify tablet_create_version_cache

commit 560dd3f3829dbc1455d7144a788b87e97e45c712
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

build: Use UTC when generating etc/sorcery/version

commit 73fbb7fcd01581412a14bad65553759fded922db
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

gaze: Normalize parameter parsing by adding a shift where trivial

diff --git a/build b/build
index 91fe886..c5a5ef9 100755
--- a/build
+++ b/build
@@ -15,7 +15,7 @@ if [ -e ../sorcery ]; then
echo "We need a blank directory beneath the current one to link sorcery ->
$branch_dir"
exit 1
fi
-[[ $branch_name == devel ]] && date "+%Y%m%d" > etc/sorcery/version
+[[ $branch_name == devel ]] && date -u "+%Y%m%d" > etc/sorcery/version
pushd .. &>/dev/null
NAMES_TMP=/tmp/sorcery.build.$$
ln -sf $branch_dir sorcery
diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index 55c0a40..c81f29e 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -575,8 +575,7 @@ function cleanse_fix()
CURNR=0

if [ $FIX == quick ] ; then
- TOTALNR=0 #counting them like this doesn't seem to take substantial time
- for unused in $SPELLS ; do let TOTALNR++ ; done
+ TOTALNR=${#SPELLS[@]}
for SPELL in $SPELLS ; do
let CURNR++
if cleanse_fix_run_checks $SPELL $CURNR $TOTALNR; then
@@ -782,12 +781,9 @@ function cleanse_fix_init_ldd_check() {
local SPELL
local I_LOG
local size count
- let size=0
let count=0
message "Doing initialization for the ldd check"
- for SPELL in $* ; do
- let size++
- done
+ size=$#
for SPELL in $* ; do
I_LOG=$INSTALL_LOGS/$SPELL-$(private_installed_version $SPELL)
hash_put ldd_hash $SPELL "$(grep '\.so$' $I_LOG|get_dirnames|sort -u|tr
'\n' :)"
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index ba53686..b144676 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -2422,18 +2422,18 @@ parse() {
tablet) shift; gaze_tablet $1 $2 ;;
activity) display $ACTIVITY_LOG ;;
from) shift; show_from "$@" ;;
- newer) newer $2 ;;
- older) older $2 ;;
+ newer) shift; newer "$1" ;;
+ older) shift; older "$1" ;;
sources) shift; sources "$@" ;;
source_urls) shift; source_urls "$@" ;;
- grimoire) shift; gaze_catalog $@ ;;
+ grimoire) shift; gaze_catalog "$@" ;;
grimoires) gaze_show_grimoires ;;
search) shift; gaze_search "$@" ;;
- provides) shift; gaze_provides $@ ;;
+ provides) shift; gaze_provides "$@" ;;
depends) shift; gaze_show_depends "$@" ;;
dependencies) shift; gaze_show_dependencies "$@" ;;
orphans) show_orphans | sort ;;
- history) show_spell_component HISTORY "$2" ;;
+ history) shift; show_spell_component HISTORY "$1" ;;
website|url) shift; gaze_show_website $@ ;;
maintainer) shift; show_maintainer $@ ;;
installed) shift; gaze_show_installed $@ ;;
@@ -2446,34 +2446,36 @@ parse() {
checkmd5s) shift; gaze_md5check $@ ;;
time) shift; gaze_time $@ ;;
time-system) shift; gaze_time_system $@ ;;
- compile) if [ -n "$3" ]; then
- VERSION=$3
+ compile)
+ shift
+ if [ -n "$2" ]; then
+ VERSION="$2"
elif [ -z "$VERSION" ]; then
- codex_set_current_spell_by_name $2
+ codex_set_current_spell_by_name "$1"
fi
- display $COMPILE_LOGS/$SPELL-$VERSION$EXTENSION \
+ display "$COMPILE_LOGS/$SPELL-$VERSION$EXTENSION" \
"Compile log for $SPELL-$VERSION does not exist"
;;

- install) [[ -n $3 ]] && VERSION="$3"
+ install) shift; [[ -n "$2" ]] && VERSION="$2"
gaze_install $SPELL $VERSION ;;
- install-full) [[ -n $3 ]] && VERSION="$3"
+ install-full) shift; [[ -n "$2" ]] && VERSION="$2"
gaze_install $SPELL $VERSION full ;;
- install-spell) [[ -n $3 ]] && VERSION="$3"
+ install-spell) shift; [[ -n "$2" ]] && VERSION="$2"
gaze_install $SPELL $VERSION spell ;;

- sum) [ -n "$SPELL" ] &&
+ sum) [ -n "$SPELL" ] &&
checksum "$INSTALL_LOGS/$SPELL-$VERSION" ||
checksum "$INSTALL_LOGS/*"
;;


- md5sum) [ -n "$SPELL" ] &&
+ md5sum) [ -n "$SPELL" ] &&
md5sum_files "$INSTALL_LOGS/$SPELL-$VERSION" ||
md5sum_files "$INSTALL_LOGS/*"
;;

- voyeur) shift 1; gaze_activate_voyeur $@ ;;
+ voyeur) shift; gaze_activate_voyeur "$@" ;;

install-queue) if [[ -s $INSTALL_QUEUE ]]; then
$PAGER $INSTALL_QUEUE
diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 2adbe72..02f9f2c 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -742,8 +742,8 @@ function tablet_check_repair_file() {
## @param file that will hold the cache
#---------------------------------------------------------------------
function tablet_create_version_cache() {
- [[ -f $1 ]] && return 0
- local file=$1
+ [[ -f "$1" ]] && return 0
+ local file="$1"
local page_dir
local spell version patchlevel security_patch updated
local rc=0
@@ -756,13 +756,8 @@ function tablet_create_version_cache() {
tablet_get_patchlevel $page_dir patchlevel > /dev/null
tablet_get_security_patch $page_dir security_patch > /dev/null
tablet_get_updated $page_dir updated > /dev/null
- echo "$spell ${version:-0} ${patchlevel:-0} ${security_patch:-0}
${updated:-0}"
- elif [[ $spell == alter ]]; then
- version=$(installed_version alter)
- echo "$spell ${version:-0} ${patchlevel:-0} ${security_patch:-0}
${updated:-0}"
- elif [[ $spell == smgl-prelink || $spell == smgl-strip ]]; then
+ elif [[ $spell == alter || $spell == smgl-prelink || $spell ==
smgl-strip ]]; then
version=$(installed_version $spell)
- echo "$spell ${version:-0} ${patchlevel:-0} ${security_patch:-0}
${updated:-0}"
else
error_message "${PROBLEM_COLOR}Creation of the cache failed at
$spell," \
"please run cleanse --tablet and retry. If some spells" \
@@ -772,6 +767,7 @@ function tablet_create_version_cache() {
rc=1
break
fi
+ echo "$spell ${version:-0} ${patchlevel:-0} ${security_patch:-0}
${updated:-0}"
done > "$file"

if [[ ${#ok_spells[@]} != $(wc -l < $file) ]]; then
@@ -779,7 +775,7 @@ function tablet_create_version_cache() {
if [[ $rc == 0 && -n $bad ]]; then
message "Spells with missing or corrupt tablet pages: $bad"
fi
- rm $file
+ rm "$file"
return 1
fi




  • [SM-Commit] GIT changes to master sorcery by Ismael Luceno (3392b6b661eba18be6a9d9d7cc77aa89e5b75479), Ismael Luceno, 07/18/2017

Archive powered by MHonArc 2.6.24.

Top of Page