Skip to Content.
Sympa Menu

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

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 (e23663104e65e95ba5c990100240f17eaa3f54ed)
  • Date: Thu, 30 Dec 2010 07:25:33 -0600

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

ChangeLog | 4 +++
var/lib/sorcery/modules/libsummon | 44
++++++++++++++++++++++++--------------
2 files changed, 32 insertions(+), 16 deletions(-)

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

libsummon: skip some more files in source_sanity

commit 90e30f9466756aabc048ecc2bb1da7aeffb80c11
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)

diff --git a/ChangeLog b/ChangeLog
index 6be83fa..29c5e03 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2010-12-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libtrack, common: newer installwatch has a different log variable
#13873
+ * libsummon: skip some more files in source_sanity
+
+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/var/lib/sorcery/modules/libsummon
b/var/lib/sorcery/modules/libsummon
index bc079df..d0ab985 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -253,14 +253,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." \
@@ -296,16 +288,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"
}

}
@@ -435,20 +434,33 @@ 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}" ]] ||
+
+ if [[ "$1" != "${1%.tar.???}" ]] ||
+ [[ "$1" != "${1%.tar.??}" ]] ||
+ [[ "$1" != "${1%.tar.?}" ]] ||
+ [[ "$1" != "${1%.tar}" ]] ||
+ [[ "$1" != "${1%.zip}" ]] ||
[[ "$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 master sorcery by Jaka Kranjc (e23663104e65e95ba5c990100240f17eaa3f54ed), Jaka Kranjc, 12/30/2010

Archive powered by MHonArc 2.6.24.

Top of Page