pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/pkgformat/pkg



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Jun  7 04:41:58 UTC 2020

Modified Files:
        pkgsrc/mk/pkgformat/pkg: metadata.mk

Log Message:
mk/.../metadata.mk: properly clean up loops after removing ""

There is no evidence that any shell needs the empty string literal in
'for i in "" $var' to loop over a simple variable.  This would only be
necessary if the shell code were generated by a preprocessor such as
bmake or autoconf, and the list of items might end up empty.  In such a
case, the empty string literal prevents to generate 'for i in ; do',
which would produce a syntax error.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/mk/pkgformat/pkg/metadata.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/pkgformat/pkg/metadata.mk
diff -u pkgsrc/mk/pkgformat/pkg/metadata.mk:1.27 pkgsrc/mk/pkgformat/pkg/metadata.mk:1.28
--- pkgsrc/mk/pkgformat/pkg/metadata.mk:1.27    Sat Jun  6 09:33:56 2020
+++ pkgsrc/mk/pkgformat/pkg/metadata.mk Sun Jun  7 04:41:58 2020
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.27 2020/06/06 09:33:56 rillig Exp $
+# $NetBSD: metadata.mk,v 1.28 2020/06/07 04:41:58 rillig Exp $
 
 ######################################################################
 ### The targets below are all PRIVATE.
@@ -107,12 +107,10 @@ ${_BUILD_INFO_FILE}: ${_PLIST_NOKEYWORDS
                ${AWK} '{ print "${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}; } | \
                ${SORT} | uniq -c | awk '$$1 == 2 {print $$2}'`; \
        for i in $$libs; do                                             \
-               ${TEST} "$$i" != "" || continue;                        \
                ${ECHO} "PROVIDES=$$i";                                 \
        done | ${SED} -e 's,^PROVIDES=${DESTDIR},PROVIDES=,'            \
                >> ${.TARGET}.tmp;                                      \
        for req in $$requires; do                                       \
-               ${TEST} "$$req" != "" || continue;                      \
                ${ECHO} "REQUIRES=$$req" >> ${.TARGET}.tmp;             \
        done
 .endif



Home | Main Index | Thread Index | Old Index