pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/pkgtasks mk/pkgtasks: Fix postinstall check to not ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/020683a12a0f
branches:  trunk
changeset: 366915:020683a12a0f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Aug 19 00:30:55 2017 +0000

description:
mk/pkgtasks: Fix postinstall check to not skip last set of files.

The postinstall check was improperly skipping the last N items
listed in CONF_FILES (and related) variables when verifying that
there is a multiple of N items listed.  Fix the bounds check.

diffstat:

 mk/pkgtasks/files.mk |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r b66537baf666 -r 020683a12a0f mk/pkgtasks/files.mk
--- a/mk/pkgtasks/files.mk      Sat Aug 19 00:30:42 2017 +0000
+++ b/mk/pkgtasks/files.mk      Sat Aug 19 00:30:55 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.mk,v 1.8 2017/08/19 00:30:42 jlam Exp $
+# $NetBSD: files.mk,v 1.9 2017/08/19 00:30:55 jlam Exp $
 #
 # Copyright (c) 2017 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -251,37 +251,37 @@
 _pkgtasks-files-postinstall-check: .PHONY
        ${RUN}set -- args ${_CONF_FILES}; shift;                        \
        while ${TEST} "$$#" -gt 0; do                                   \
-               ${TEST} "$$#" -gt 2 || break;                           \
+               ${TEST} "$$#" -ge 2 || break;                           \
                egfile="$$1"; shift 2;                                  \
                varname="CONF_FILES"; ${_PKGTASKS_CHECK_EGFILE};        \
        done
        ${RUN}set -- args ${_CONF_FILES_PERMS}; shift;                  \
        while ${TEST} "$$#" -gt 0; do                                   \
-               ${TEST} "$$#" -gt 5 || break;                           \
+               ${TEST} "$$#" -ge 5 || break;                           \
                egfile="$$1"; shift 5;                                  \
                varname="CONF_FILES_PERMS"; ${_PKGTASKS_CHECK_EGFILE};  \
        done
        ${RUN}set -- args ${_REQD_FILES}; shift;                        \
        while ${TEST} "$$#" -gt 0; do                                   \
-               ${TEST} "$$#" -gt 2 || break;                           \
+               ${TEST} "$$#" -ge 2 || break;                           \
                egfile="$$1"; shift 2;                                  \
                varname="REQD_FILES"; ${_PKGTASKS_CHECK_EGFILE};        \
        done
        ${RUN}set -- args ${_REQD_FILES_PERMS}; shift;                  \
        while ${TEST} "$$#" -gt 0; do                                   \
-               ${TEST} "$$#" -gt 5 || break;                           \
+               ${TEST} "$$#" -ge 5 || break;                           \
                egfile="$$1"; shift 5;                                  \
                varname="REQD_FILES_PERMS"; ${_PKGTASKS_CHECK_EGFILE};  \
        done
        ${RUN}set -- args ${__INIT_SCRIPTS}; shift;                     \
        while ${TEST} "$$#" -gt 0; do                                   \
-               ${TEST} "$$#" -gt 2 || break;                           \
+               ${TEST} "$$#" -ge 2 || break;                           \
                egfile="$$1"; shift 2;                                  \
                varname="INIT_SCRIPTS"; ${_PKGTASKS_CHECK_EGFILE};      \
        done
        ${RUN}set -- args ${__INIT_SCRIPTS_PERMS}; shift;               \
        while ${TEST} "$$#" -gt 0; do                                   \
-               ${TEST} "$$#" -gt 5 || break;                           \
+               ${TEST} "$$#" -ge 5 || break;                           \
                egfile="$$1"; shift 5;                                  \
                varname="INIT_SCRIPTS_PERMS"; ${_PKGTASKS_CHECK_EGFILE}; \
        done



Home | Main Index | Thread Index | Old Index