diff options
author | B. Watson <urchlay@slackware.uk> | 2023-06-17 02:12:38 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-06-17 02:12:38 -0400 |
commit | 92d24666baf06dfd2fc993c28a9eaf5fbb9e53fb (patch) | |
tree | 660bef4794f1e72020e0ebc0ef0c05782d49a48b | |
parent | 7e88e51ed292cdca94cd5f1ab1c00483565358b7 (diff) | |
download | sbo-maintainer-tools-92d24666baf06dfd2fc993c28a9eaf5fbb9e53fb.tar.gz |
sbopkglint: spaces in filenames WIP #6.
-rw-r--r-- | sbopkglint.d/60-usr_info.t.sh | 33 |
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 |