sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to stable-1.14 sorcery by Jaka Kranjc (72d9b8fc7c5c69c0bbcbd607909b819d6a255276)
- From: Jaka Kranjc <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to stable-1.14 sorcery by Jaka Kranjc (72d9b8fc7c5c69c0bbcbd607909b819d6a255276)
- Date: Fri, 23 Sep 2011 03:49:56 -0500
GIT changes to stable-1.14 sorcery by Jaka Kranjc
<lynxlynxlynx AT sourcemage.org>:
ChangeLog | 19 +++++++++++++++++++
etc/sorcery/config | 8 +-------
etc/sorcery/version | 2 +-
var/lib/sorcery/modules/libmisc | 8 +++++++-
var/lib/sorcery/modules/libsorcery | 37
+++++++++++++++++++++++++++++++++++++
var/lib/sorcery/modules/libsummon | 37
+++++++++++++++++++++++--------------
6 files changed, 88 insertions(+), 23 deletions(-)
New commits:
commit 72d9b8fc7c5c69c0bbcbd607909b819d6a255276
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
1.14.6
commit c9152dcf27fbdc76efecf500cb1b0bb2f337342d
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
1.14.6-rc1
commit 2a4a8589bb715c8d168bdec9d5cbcbf79f6ecd92
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libsorcery: avoid passing bad parameters when PAGER has none
(cherry-picked from commit c0ff54d58b1e3c8f45b7218dd53b45fcb71bb2df)
commit a39313c2bf87f7f2982cb34a38d2f540a7fa14ce
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libsorcery: default the pager to cat if nothing is specified and less
is not present on the system
(cherry-picked from commit 2b971f2fb7deaec22c487b66291f7a9c21088a4f)
commit aceea48ef0798dd410bdfd8a2a0a68a24e3d903d
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libmisc: fixed remove_files_and_dirs not removing some dirs #15804
(cherry-picked from commit e53fd9adf691393eb5f8f4e157118dab13898200)
commit 2c21011c27a4bfa79157e72f9f0ef16b4354c17c
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
config, libsorcery: be a bit more smart about setting the pager #15793
(since the way the grimoire handles it has changed) based on a patch by
PyroBor
(cherry-picked from commit c3c12e1970e13542961b0dee1f41f5a4f70f989e)
commit 5e97bbe3cebebf58dc6488310ac6db3d1a29ea9b
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libsummon: moved sanity check of source to right after download (#15886)
(cherry-picked from commit 90e30f9466756aabc048ecc2bb1da7aeffb80c11)
commit 40bc02d8fd809ee9bb9816ec25d2a2d952044350
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libtrack, common: newer installwatch has a different log variable #13873
(cherry-picked from commit 8711bb60fc5c29235bee8bb5cfe14a0308e4c135)
diff --git a/ChangeLog b/ChangeLog
index 33609ba..a5293cd 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,25 @@
+2011-09-23 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * version: 1.14.6 released
+
+2010-01-01 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libsorcery: avoid passing bad parameters when PAGER has none
+
+2010-12-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libsorcery: default the pager to cat if nothing is specified and
less
+ is not present on the system
+
+2010-12-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libmisc: fixed remove_files_and_dirs not removing some dirs #15804
+
+2010-12-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * config, libsorcery: be a bit more smart about setting the pager
#15793
+
2010-12-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libtrack, common: newer installwatch has a different log variable
#13873
+2010-10-19 Bor Kraljič <pyrobor AT ver.si>
+ * libsummon: moved sanity check of source to right after download
(#15886)
+
2010-10-19 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* version: 1.14.5 released
diff --git a/etc/sorcery/config b/etc/sorcery/config
index 03ed8cf..72adac9 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -47,13 +47,6 @@ FORCE_BASESYSTEM_DEPENDS=${FORCE_BASESYSTEM_DEPENDS:-off}
URL_HTTP_FTP_TIMEOUT=${URL_HTTP_FTP_TIMEOUT:=90}
- # pager info
- # -R: display color codes properly
- # -E: quit at eof (otherwise scribe pauses on empty
updates)
- # -X: dont do screen init and deinit, gaze install
- # of a small spell is effectively useless otherwise as
the
- # screen is cleared afterwards.
- PAGER=${PAGER:=less -R -F -X -f}
FILEPROG=${FILEPROG:=file}
DIALOGPROG=${DIALOGPROG:=dialog}
@@ -164,6 +157,7 @@ PROGRESS_SPINNER_CHARS='-\|/'
STANDARD_IFS=$WHITESPACE_IFS
. $SUBROUTINES
+set_pager
. $MEDIA_CONFIG
. $ROOTS_CONFIG
diff --git a/etc/sorcery/version b/etc/sorcery/version
index 24a57f2..c6ba3bc 100644
--- a/etc/sorcery/version
+++ b/etc/sorcery/version
@@ -1 +1 @@
-1.14.5
+1.14.6
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 51294b9..da10053 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1078,7 +1078,13 @@ function misc_is_function() {
#---------------------------------------------------------------------
function remove_files_and_dirs() {
cat $1 | while read file; do
- test -d $file || rm -f $file
+ if [[ ! -d $file ]]; then
+ rm -f $file
+ else
+ # also try to remove empty dirs, as
+ # the leaves are not taken care of by the next block #15804
+ rmdir $file &>/dev/null
+ fi
done
# remove possibly empty directories, rmdir WILL have error output
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index dc03b32..a455efc 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1640,6 +1640,43 @@ function filename_indicates_compression() {
#---------------------------------------------------------------------
+## Sets the most appropriate params for PAGER
+## @Globals PAGER
+#---------------------------------------------------------------------
+function set_pager() {
+ if [[ -z $PAGER ]]; then
+ if real_spell_ok less; then
+ # pager info
+ # -R: display color codes properly
+ # -F: quit on one-screenfull of data (otherwise scribe pauses on empty
updates)
+ # -X: dont do screen init and deinit, gaze install
+ # of a small spell is effectively useless otherwise as the
+ # screen is cleared afterwards.
+ # -f: force it, since we may not be dealing with a regular file
+ PAGER="less -R -F -X -f"
+ else
+ PAGER=cat
+ fi
+ return
+ fi
+
+ local pager_prog
+ local pager_params=${PAGER#* }
+ smgl_basename "${PAGER%% *}" pager_prog
+ # setting PAGER to a single word would give bad parameters
+ [[ $pager_prog == $PAGER ]] && unset pager_params
+
+ # TODO: add any needed options for the rest of the pagers
+ case $pager_prog in
+ less) PAGER="less -R -F -X -f $pager_params" ;;
+ most) PAGER="most $pager_params" ;;
+ w3m) PAGER="w3m $pager_params" ;;
+ more) PAGER="more $pager_params";;
+ *) ;;
+ esac
+}
+
+#---------------------------------------------------------------------
##
## This software is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/var/lib/sorcery/modules/libsummon
b/var/lib/sorcery/modules/libsummon
index eaf0e2a..d36f438 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -252,14 +252,6 @@ function download_src_args() {
if [[ $summon_target != $target ]] ; then
mv -f "$summon_target" "$target"
fi
- local type
- if ! source_sanity "$target" "type"; then
- message "${PROBLEM_COLOR}Sanity check of${DEFAULT_COLOR}" \
- "${FILE_COLOR}${target}${DEFAULT_COLOR}" \
- "${PROBLEM_COLOR}failed:${DEFAULT_COLOR}"
- message "$type"
- return 1
- fi
else
message "${PROBLEM_COLOR}Unknown download type: \"$summon_type\""\
"at \"$summon_target\". Please file a bug if you see this." \
@@ -295,16 +287,23 @@ function download_src_sub() {
{
[[ $guess_type == file ]] &&
download_from_leapforward "$target" "$url_list" "$hints" \
- "$_summon_target" "$_summon_type"
+ "$_summon_target" "$_summon_type" &&
+ source_sanity "$target"
} ||
- url_download_expand_sort "$target" "$url_list" "$hints" \
- "$_summon_target" "$_summon_type" ||
+ {
+ url_download_expand_sort "$target" "$url_list" "$hints" \
+ "$_summon_target" "$_summon_type" &&
+ if [[ $guess_type == file ]]; then
+ source_sanity "$target"
+ fi
+ } ||
{ # dont use fallback if the type is not a file (bug 9847)
[[ $guess_type == file ]] &&
download_from_fallback "$target" "$url_list" "$hints" \
- "$_summon_target" "$_summon_type"
+ "$_summon_target" "$_summon_type" &&
+ source_sanity "$target"
}
}
@@ -434,20 +433,30 @@ function unpack_for_update() {
## the requested file, which then successfully downloads (which is
## the correct thing to do). We catch that here rather than wait for
## file verification to catch it.
+## @param file to check
+## @Stdout error message if file fails the check
+## @return 1 if file fails the check
+## @return 0 if file passes the check
#---------------------------------------------------------------------
function source_sanity() {
[[ "$1" ]] || return 0
[[ "$SUMMON_SANITY" == off ]] && return 0
+ local core_msg
+ core_msg="${PROBLEM_COLOR}Sanity check of${DEFAULT_COLOR}"
+ core_msg="$core_msg ${FILE_COLOR}$1${DEFAULT_COLOR}"
+ core_msg="$core_msg ${PROBLEM_COLOR}failed:${DEFAULT_COLOR}\n"
+
if ! test -s "$1"; then
- upvar "$2" "Empty"
+ message "$core_msg Empty"
return 1
fi
+
if [[ "$1" != "${1%.tar.bz2}" ]] ||
[[ "$1" != "${1%.tar.gz}" ]] ||
[[ "$1" != "${1%.tgz}" ]]; then
local _type=$(file -bi "$1")
if echo $_type | grep -iq "text/"; then
- upvar "$2" "$_type"
+ message "$core_msg $_type"
return 1
fi
fi
- [SM-Commit] GIT changes to stable-1.14 sorcery by Jaka Kranjc (72d9b8fc7c5c69c0bbcbd607909b819d6a255276), Jaka Kranjc, 09/23/2011
Archive powered by MHonArc 2.6.24.