pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   rillig
Date:           Mon Jan  4 21:10:01 UTC 2021

Modified Files:
        pkgsrc/mk/check: check-portability.sh
        pkgsrc/regress/infra-unittests: check-portability.sh

Log Message:
check-portability: always skip files whose name ends with tilde

Suggested by wiz.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/mk/check/check-portability.sh
cvs rdiff -u -r1.6 -r1.7 pkgsrc/regress/infra-unittests/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.22 pkgsrc/mk/check/check-portability.sh:1.23
--- pkgsrc/mk/check/check-portability.sh:1.22   Tue May  5 05:55:26 2020
+++ pkgsrc/mk/check/check-portability.sh        Mon Jan  4 21:10:01 2021
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.22 2020/05/05 05:55:26 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.23 2021/01/04 21:10:01 rillig Exp $
 #
 # This program checks all files in the current directory and any
 # subdirectories for portability issues that are likely to result in
@@ -55,10 +55,11 @@ find ./* -type f -print 2>/dev/null \
 
                skip=no
                eval "case \"\$fname\" in $SKIP_FILTER *.orig) skip=yes;; esac"
-               case "$fname" in *.in)
-                       case ",$patched_files," in *,"${fname%.in}",*)
+               case "$fname" in
+               *.in)   case ",$patched_files," in *,"${fname%.in}",*)
                                skip=yes
-                       esac
+                       esac;;
+               *~)     skip=yes;;
                esac
                [ $skip = no ] || continue
 

Index: pkgsrc/regress/infra-unittests/check-portability.sh
diff -u pkgsrc/regress/infra-unittests/check-portability.sh:1.6 pkgsrc/regress/infra-unittests/check-portability.sh:1.7
--- pkgsrc/regress/infra-unittests/check-portability.sh:1.6     Mon Jan  4 21:07:31 2021
+++ pkgsrc/regress/infra-unittests/check-portability.sh Mon Jan  4 21:10:01 2021
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: check-portability.sh,v 1.6 2021/01/04 21:07:31 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.7 2021/01/04 21:10:01 rillig Exp $
 #
 # Test cases for mk/check/check-portability.*.
 #
@@ -265,30 +265,8 @@ if test_case_begin 'always skip tilde fi
        check_portability_sh \
                'CHECK_PORTABILITY_EXPERIMENTAL=no'
 
-       create_file 'expected' <<'EOF'
-ERROR: [check-portability.awk] => Found test ... == ...:
-ERROR: [check-portability.awk] configure~:2: test a == b
-
-Explanation:
-===========================================================================
-The "test" command, as well as the "[" command, are not required to know
-the "==" operator. Only a few implementations like bash and some
-versions of ksh support it.
-
-When you run "test foo == foo" on a platform that does not support the
-"==" operator, the result will be "false" instead of "true". This can
-lead to unexpected behavior.
-
-There are two ways to fix this error message. If the file that contains
-the "test ==" is needed for building the package, you should create a
-patch for it, replacing the "==" operator with "=". If the file is not
-needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
-package Makefile.
-===========================================================================
-
-EOF
-       assert_that "$tmpdir/out" --file-equals 'expected'
-       assert_that $exitcode --equals 1
+       assert_that "$tmpdir/out" --file-is-empty
+       assert_that $exitcode --equals 0
 
        test_case_end
 fi



Home | Main Index | Thread Index | Old Index