Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/pkgformat/pkg mk/.../metadata.mk: fix reference to ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2f31dcf03391
branches:  trunk
changeset: 433644:2f31dcf03391
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Jun 06 09:33:56 2020 +0000

description:
mk/.../metadata.mk: fix reference to undefined shell variable

When RUN includes the -u shell option (see the pkgsrc guide, section
bulk.var.shvar), there is a stray "requires: parameter not set" error.

This error doesn't make the build fail immediately since it is on the
left-hand side of a pipe, where the exit status is ignored.  It would
fail if the shell for bmake were set to bash and its option "pipefail"
were enabled.

diffstat:

 mk/pkgformat/pkg/metadata.mk |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 7289d1b57e9a -r 2f31dcf03391 mk/pkgformat/pkg/metadata.mk
--- a/mk/pkgformat/pkg/metadata.mk      Sat Jun 06 09:24:27 2020 +0000
+++ b/mk/pkgformat/pkg/metadata.mk      Sat Jun 06 09:33:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.26 2020/05/22 01:24:05 joerg Exp $
+# $NetBSD: metadata.mk,v 1.27 2020/06/06 09:33:56 rillig Exp $
 
 ######################################################################
 ### The targets below are all PRIVATE.
@@ -62,6 +62,7 @@
        *)      ldd=${LDD:Q} ;;                                         \
        esac;                                                           \
        bins=`${AWK} '/(^|\/)(bin|sbin|libexec)\// { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \
+       requires="";                                                    \
        case ${OBJECT_FMT:Q}"" in                                       \
        ELF)                                                            \
                libs=`${AWK} '/\/lib.*\.so(\.[0-9]+)*$$/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \
@@ -105,12 +106,12 @@
        requires=`{ for i in $$requires $$requires; do echo $$i; done; \
                ${AWK} '{ print "${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}; } | \
                ${SORT} | uniq -c | awk '$$1 == 2 {print $$2}'`; \
-       for i in "" $$libs; do                                          \
+       for i in $$libs; do                                             \
                ${TEST} "$$i" != "" || continue;                        \
-               ${ECHO} "PROVIDES=$${i}";                               \
+               ${ECHO} "PROVIDES=$$i";                                 \
        done | ${SED} -e 's,^PROVIDES=${DESTDIR},PROVIDES=,'            \
                >> ${.TARGET}.tmp;                                      \
-       for req in "" $$requires; do                                    \
+       for req in $$requires; do                                       \
                ${TEST} "$$req" != "" || continue;                      \
                ${ECHO} "REQUIRES=$$req" >> ${.TARGET}.tmp;             \
        done



Home | Main Index | Thread Index | Old Index