New commits:
commit 72ea2143506655aca6020f60f76e48cea5e6b8fd
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>
fix bug 13173, add check for empty files in summon sanity checker
commit bc44c31d5f8b7fcfe01e6ae774356cf238c52c3d
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>
WHITESPACE_IFS=$' \t\n'
diff --git a/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index f30acad..6cf3f54 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -151,7 +151,7 @@ ## Gathers all documentation files from
## them as part of the spell
##
#---------------------------------------------------------------------
-function real_gather_docs() {
+function real_gather_docs() { (
- for i in ${DOCS[@]}
- do
- cp -r $SOURCE_DIRECTORY/${i} $DOC_DIR 2>/dev/null
+ cd $SOURCE_DIRECTORY
+ shopt -s nullglob
+ for i in ${DOCS}; do
+ if test -f "$i"; then
+ file $i|grep -q executable && continue
+ cp $SOURCE_DIRECTORY/${i} $DOC_DIR 2>/dev/null
+ elif test -d "$i"; then
+ cp -r $SOURCE_DIRECTORY/${i} $DOC_DIR 2>/dev/null
+ fi
done
- # what is this here for and why isn't it part of the standard DOCS
- # variable?
- cp $SOURCE_DIRECTORY/*rc $DOC_DIR 2>/dev/null
-
# making installed docs readable for all users.
chmod -fR a+r $DOC_DIR
fi
-}
+) }
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libsummon
b/var/lib/sorcery/modules/libsummon
index 97c36b2..b8d9eb7 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -418,8 +418,12 @@ ## the correct thing to do). We catch th
## file verification to catch it.
#---------------------------------------------------------------------
function source_sanity() {
- [[ "$1" ]] && return 0
+ [[ "$1" ]] || return 0
[[ "$SUMMON_SANITY" == off ]] && return 0
+ if ! test -s "$1"; then
+ upvar "$2" "Empty"
+ return 1
+ fi
if [[ "$1" != "${1%.tar.bz2}" ]] ||
[[ "$1" != "${1%.tar.gz}" ]] ||
[[ "$1" != "${1%.tgz}" ]]; then
[SM-Commit] GIT changes to devel-stage-root sorcery by David Brown (6bab4bcaf5d4e2d1c136ab30b8761d423f523861),
David Brown, 11/03/2006