pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/check Only check executable files for valid interpr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d1a501d19071
branches:  trunk
changeset: 650954:d1a501d19071
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Apr 29 13:05:28 2015 +0000

description:
Only check executable files for valid interpreters.  By the time this check is
performed all installed files should have their correct mode set, and there are
no INSTALL scripts that currently change file modes under PREFIX after
installation (nor should they ever).

This change considerably speeds up the test.  For example in www/firefox-l10n
the time to run the test reduces from 181 seconds (135 seconds of system time)
down to 10 seconds (6 seconds system time) on my SmartOS build systems.

diffstat:

 mk/check/check-interpreter.mk |  13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diffs (35 lines):

diff -r ae1558a1ac9b -r d1a501d19071 mk/check/check-interpreter.mk
--- a/mk/check/check-interpreter.mk     Wed Apr 29 12:53:02 2015 +0000
+++ b/mk/check/check-interpreter.mk     Wed Apr 29 13:05:28 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-interpreter.mk,v 1.28 2014/10/12 23:39:17 joerg Exp $
+# $NetBSD: check-interpreter.mk,v 1.29 2015/04/29 13:05:28 jperkin Exp $
 #
 # This file checks that after installation, all files of the package
 # that start with a "#!" line will find their interpreter. Files that
@@ -53,7 +53,7 @@
                ${_CHECK_INTERP_SKIP:@p@${p}) continue ;;@}             \
                *) ;;                                                   \
                esac;                                                   \
-               if [ ! -f "$$file" ]; then                              \
+               if [ ! -x "$$file" ]; then                              \
                        continue;                                       \
                fi;                                                     \
                if [ ! -r "$$file" ]; then                              \
@@ -74,15 +74,8 @@
                        fi;                                             \
                        continue;;                                      \
                esac;                                                   \
-                                                                       \
                if { [ ! -f ${DESTDIR:Q}"$$interp" ] &&                 \
                     [ ! -f "$$interp" ]; }; then                       \
-                                                                       \
-                       if [ -x "$$file" ]; then                        \
-                               ${DELAYED_ERROR_MSG} "[check-interpreter.mk] The interpreter \"$$interp\" of \"${DESTDIR}${PREFIX}/$$file\" does not exist."; \
-                       else                                            \
-                                                                       \
-                               ${DELAYED_WARNING_MSG} "[check-interpreter.mk] The interpreter \"$$interp\" of \"${DESTDIR}${PREFIX}/$$file\" does not exist."; \
-                       fi;                                             \
+                       ${DELAYED_ERROR_MSG} "[check-interpreter.mk] The interpreter \"$$interp\" of \"${DESTDIR}${PREFIX}/$$file\" does not exist."; \
                fi;                                                     \
        done



Home | Main Index | Thread Index | Old Index