summaryrefslogtreecommitdiff
path: root/mk/check
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-12-12 21:10:41 +0000
committerrillig <rillig@pkgsrc.org>2006-12-12 21:10:41 +0000
commit60774a414d383987f3321329ab4c1a55d657d3f8 (patch)
tree982b238c2dd18f2e1b8be73a074ff75dc049f8b7 /mk/check
parentd3114b2b63ea37f0747e8aef02d9bdc80da197fa (diff)
downloadpkgsrc-60774a414d383987f3321329ab4c1a55d657d3f8.tar.gz
On Solaris 5.9, the ksh cannot handle null bytes in the input. It's
documented in a SunSolve document, but that document is not accessible to the public. There's no better way than to start a subshell executing sed(1) in this case. This makes the test even slower on these machines, and is not even guaranteed to work in all cases. That's life.
Diffstat (limited to 'mk/check')
-rw-r--r--mk/check/check-portability.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh
index 2db4fbbdbc5..7f5f0024e23 100644
--- a/mk/check/check-portability.sh
+++ b/mk/check/check-portability.sh
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.3 2006/11/09 14:36:18 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.4 2006/12/12 21:10:41 rillig Exp $
#
# This program checks the extracted files for portability issues that
# are likely to result in false assumptions by the package.
@@ -28,13 +28,24 @@ check_shell() {
find * -type f -print 2>/dev/null \
| {
+ opsys=`uname -s`-`uname -r`
while read fname; do
skip=no
eval "case \"\$fname\" in $SKIP_FILTER *.orig) skip=yes;; esac"
[ $skip = no ] || continue
- read firstline < "$fname" || continue
+ case "$opsys" in
+ SunOS-5.9)
+ # See also (if you can):
+ # http://sunsolve.sun.com/search/document.do?assetkey=1-1-4250902-1
+ firstline=`sed 1q < "$fname"`
+ ;;
+
+ *) read firstline < "$fname" || continue
+ ;;
+ esac
+
case "$firstline" in
"#!"*"/bin/sh")
check_shell "$fname"