pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/check
Module Name: pkgsrc
Committed By: rillig
Date: Thu Mar 12 18:40:06 UTC 2020
Modified Files:
pkgsrc/mk/check: check-portability.sh
Log Message:
mk/check/check-portability: support file names with spaces
Before, file names that start or end with spaces were trimmed by read(1),
as specified by POSIX 2004 and POSIX 2018.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html
This edge case bug had been present since the very beginning of this
code, in November 2006.
Filenames containing backslashes or newlines are still not supported, and
probably never will be intentionally supported.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/mk/check/check-portability.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/check/check-portability.sh
diff -u pkgsrc/mk/check/check-portability.sh:1.14 pkgsrc/mk/check/check-portability.sh:1.15
--- pkgsrc/mk/check/check-portability.sh:1.14 Thu Mar 12 08:44:15 2020
+++ pkgsrc/mk/check/check-portability.sh Thu Mar 12 18:40:06 2020
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.14 2020/03/12 08:44:15 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.15 2020/03/12 18:40:06 rillig Exp $
#
# This program checks all files in the current directory and any
# subdirectories for portability issues that are likely to result in
@@ -34,10 +34,13 @@ check_shell() {
fi
}
-find * -type f -print 2>/dev/null \
+find ./* -type f -print 2>/dev/null \
+| sed 's,$,_,' \
| {
opsys=`uname -s`-`uname -r`
while read fname; do
+ fname="${fname#./}"
+ fname="${fname%_}"
skip=no
eval "case \"\$fname\" in $SKIP_FILTER *.orig) skip=yes;; esac"
Home |
Main Index |
Thread Index |
Old Index