aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbopkglint.d/60-usr_info.t.sh33
1 files changed, 20 insertions, 13 deletions
diff --git a/sbopkglint.d/60-usr_info.t.sh b/sbopkglint.d/60-usr_info.t.sh
index a9b2494..fd1c976 100644
--- a/sbopkglint.d/60-usr_info.t.sh
+++ b/sbopkglint.d/60-usr_info.t.sh
@@ -54,18 +54,25 @@ check_info() {
}
if [ -d usr/info ]; then
+ find_warnfiles "/usr/info may not contain filenames with spaces:" \
+ usr/info -name '* *'
+
for i in usr/info/*; do
if [ "$i" != 'usr/info/*' ]; then
- if [ -d "$i" ]; then
- BADDIRS+="$i "
- else
- case "$i" in
- usr/info/dir) dir_found=1 ; check_info "$i" 0 ;;
- *.info*.gz) info_found=1 ; check_info "$i" 1 ;;
- *.info*) info_found=1 ; check_info "$i" 0 ; NONGZIP+="$i " ;;
- *) BADFILES+="$i " ;;
- esac
- fi
+ case "$i" in
+ *' '*) ;; # space in filename, already complained about
+ *)
+ if [ -d "$i" ]; then
+ BADDIRS+="$i "
+ else
+ case "$i" in
+ usr/info/dir) dir_found=1 ; check_info "$i" 0 ;;
+ *.info*.gz) info_found=1 ; check_info "$i" 1 ;;
+ *.info*) info_found=1 ; check_info "$i" 0 ; NONGZIP+="$i " ;;
+ *) BADFILES+="$i " ;;
+ esac
+ fi
+ esac
fi
done
@@ -77,11 +84,11 @@ if [ -d usr/info ]; then
;;
"01") warn "package has info files, but doinst.sh does not call install-info" ;;
"10") warn "package has no info files, but /usr/info/dir is created by doinst.sh (huh?)" ;;
- "00") warn "/usr/info exists, but contains no info files" ;;
+ "00") warn "/usr/info exists, but contains no valid info files" ;;
esac
[ -n "$BADDIRS" ] && warn "/usr/info may not contain subdirectories: " && ls -ld $BADDIRS
- [ -n "$BADFILES" ] && warn "/usr/info contains bogus files: " && ls -ld $BADFILES
- [ -n "$NONINFO" ] && warn "/usr/info contains bad info files: " && ls -ld $NONINFO
+ [ -n "$BADFILES" ] && warn "/usr/info contains non-info files: " && ls -ld $BADFILES
+ [ -n "$NONINFO" ] && warn "/usr/info contains invalid info files: " && ls -ld $NONINFO
[ -n "$NONGZIP" ] && note "/usr/info contains non-gzipped info files: " && ls -ld $NONGZIP
fi