Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test-1.14 sorcery by Jaka Kranjc (a39313c2bf87f7f2982cb34a38d2f540a7fa14ce)

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 test-1.14 sorcery by Jaka Kranjc (a39313c2bf87f7f2982cb34a38d2f540a7fa14ce)
  • Date: Thu, 30 Dec 2010 11:02:20 -0600

GIT changes to test-1.14 sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 16 +++++++++++++
etc/sorcery/config | 8 ------
var/lib/sorcery/modules/build_api/common | 2 -
var/lib/sorcery/modules/libapi | 2 -
var/lib/sorcery/modules/libmisc | 10 ++++++--
var/lib/sorcery/modules/libsorcery | 35 +++++++++++++++++++++++++++++
var/lib/sorcery/modules/libsummon | 37
+++++++++++++++++++------------
var/lib/sorcery/modules/libtrack | 7 +++--
8 files changed, 89 insertions(+), 28 deletions(-)

New commits:
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 ee5d121..9aae007 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+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-09-22 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libinitd: fixed bad regexes, grep 2.7 does not tolerate them #15852

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/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index 1fab067..a064107 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -409,7 +409,7 @@ function run_spell_failure() {
# This may have been locked if there was a failure during the install
unlock_resources "libgrimoire" "install"

- IW_LOG="$INSTALLWATCHFILE"
+ IW_LOG="${INSTALLWATCHFILE:-$INSTW_LOGFILE}"
devoke_installwatch

rm -f $IW_LOG $C_LOG
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index d5a4465..ea24ff7 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -129,7 +129,7 @@
# CAST_HASH BACK_CAST_HASH CANNOT_CAST_HASH uncommitted_hash NEW_DEPENDS
# spell_depends DEPENDS_CONFIG UP_DEPENDS SPELL_CONFIG GRIMOIRE_DIR
# BUILD_API VOYEUR_STDOUT VOYEUR_STDERR C_LOG C_FIFO INST_LOG MD5_LOG
-# INSTALLWATCHFILE CAST_EXIT_STATUS
+# INSTALLWATCHFILE INSTW_LOGFILE CAST_EXIT_STATUS
#
#---------------------------------------------------------------------

diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 8e4889f..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
@@ -1257,7 +1263,7 @@ function is_sorcery_var() {
spell_depends DEPENDS_CONFIG UP_DEPENDS SPELL_CONFIG GRIMOIRE_DIR \
SCRIPT_DIRECTORY SECTION_DIRECTORY GRIMOIRE SPELL_DIRECTORY SECTION \
BUILD_API VOYEUR_STDOUT VOYEUR_STDERR C_LOG C_FIFO INSTALL_ROOT HOST \
- BUILD INST_LOG MD5_LOG INSTALLWATCHFILE CAST_EXIT_STATUS"
+ BUILD INST_LOG MD5_LOG INSTALLWATCHFILE INSTW_LOGFILE CAST_EXIT_STATUS"

# the \\< \\> matches word boundaries
echo $vars|grep -q "\\<$1\\>"
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index dc03b32..ed5ff6b 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1640,6 +1640,41 @@ 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
+
+ # 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
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 951c14a..59b12eb 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -38,7 +38,7 @@ function exists() {
#---------------------------------------------------------------------
function real_track_manual() {
if [[ -z "$STAGED_INSTALL" || $STAGED_INSTALL == off ]] &&
- [[ -z "$INSTALLWATCHFILE" ]] ; then
+ [[ -z "$INSTALLWATCHFILE" && -z "$INSTW_LOGFILE" ]] ; then
echo "Can't tell installwatch to manually track... installwatch isn't
running."
return 1
fi
@@ -154,6 +154,7 @@ function destroy_stage_root()
function real_invoke_installwatch() {
if [[ -e $INSTALLWATCH_SO ]]; then
export INSTALLWATCHFILE=$IW_LOG
+ export INSTW_LOGFILE=$IW_LOG
export LD_PRELOAD=$INSTALLWATCH_SO
fi
}
@@ -165,7 +166,7 @@ function real_invoke_installwatch() {
#---------------------------------------------------------------------
function real_devoke_installwatch() {
unset LD_PRELOAD
- unset INSTALLWATCHFILE
+ unset INSTALLWATCHFILE INSTW_LOGFILE
}

function is_castfs_installed()
@@ -198,7 +199,7 @@ function parse_iw() {
# tab character and not some number of spaces. Otherwise BAD THINGS
# will happen.
local TAB=$'\t'
- OMIT_IN="${TAB}rename\|${TAB}symlink\|${TAB}unlink"
+
OMIT_IN="${TAB}rename\|${TAB}symlink\|${TAB}unlink\|${TAB}access\|${TAB}utimes"

grep -v "$OMIT_IN" $INPUT | cut -f3 | grep "^/" | sed 's#^//#/#g'
cat $INPUT | cut -f4 | grep "^/" | sed 's#^//#/#g'



  • [SM-Commit] GIT changes to test-1.14 sorcery by Jaka Kranjc (a39313c2bf87f7f2982cb34a38d2f540a7fa14ce), Jaka Kranjc, 12/30/2010

Archive powered by MHonArc 2.6.24.

Top of Page