pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/tools



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun May 10 14:36:18 UTC 2020

Modified Files:
        pkgsrc/mk/tools: create.mk

Log Message:
mk/tools: don't create empty symlink for wrong tool definition

This case can only happen in the following special case:

TOOLS_CREATE+=          asdf
TOOLS_PATH.asdf=        # empty

If there is a lonely TOOLS_CREATE without a corresponding TOOLS_PATH, it
defaults to ${FALSE} and thus doesn't trigger this code.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/mk/tools/create.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/tools/create.mk
diff -u pkgsrc/mk/tools/create.mk:1.13 pkgsrc/mk/tools/create.mk:1.14
--- pkgsrc/mk/tools/create.mk:1.13      Sat May  9 21:08:05 2020
+++ pkgsrc/mk/tools/create.mk   Sun May 10 14:36:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: create.mk,v 1.13 2020/05/09 21:08:05 rillig Exp $
+# $NetBSD: create.mk,v 1.14 2020/05/10 14:36:18 rillig Exp $
 #
 # Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -160,7 +160,9 @@ ${TOOLS_CMD.${_t_}}:
                logprefix='"set args$$shquoted_args; shift; "';         \
                logmain=${TOOLS_SCRIPT.${_t_}:Q:Q};                     \
                logsuffix='';                                           \
-       elif ${TEST} -n ${TOOLS_PATH.${_t_}:Q}""; then                  \
+       elif ${TEST} -z ${TOOLS_PATH.${_t_}:Q}""; then                  \
+               ${FAIL_MSG} "[mk/tools/create.mk] Invalid tool definition for ${_t_}"; \
+       else                                                            \
                if ${TEST} -n ${TOOLS_ARGS.${_t_}:Q}""; then            \
                        create=wrapper;                                 \
                        script=${TOOLS_SCRIPT_DFLT.${_t_}:Q};           \
@@ -177,8 +179,6 @@ ${TOOLS_CMD.${_t_}}:
                                logsuffix='$$shquoted_args';            \
                        esac;                                           \
                fi;                                                     \
-       else                                                            \
-               create=symlink;                                         \
        fi;                                                             \
        case "$$create" in                                              \
        wrapper)                                                        \



Home | Main Index | Thread Index | Old Index