pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc mk/bsd.pkg.mk: support spaces in PATH directories



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f3ea9bccbe69
branches:  trunk
changeset: 423083:f3ea9bccbe69
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Feb 09 22:39:20 2020 +0000

description:
mk/bsd.pkg.mk: support spaces in PATH directories

Fixes PR pkg/53959.

diffstat:

 mk/bsd.pkg.mk     |  8 +++++---
 regress/path/spec |  8 +++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (43 lines):

diff -r 278f4a960a9d -r f3ea9bccbe69 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Sun Feb 09 22:28:58 2020 +0000
+++ b/mk/bsd.pkg.mk     Sun Feb 09 22:39:20 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.2034 2020/01/21 10:56:54 kamil Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.2035 2020/02/09 22:39:20 rillig Exp $
 #
 # This file is in the public domain.
 #
@@ -442,8 +442,10 @@
 MAKEFLAGS+=            _PATH_ORIG=${_PATH_ORIG:Q}
 .endif
 
-_PATH_COMPONENTS=      ${PREPEND_PATH:[-1..1]} ${_PATH_ORIG:C,:, ,}
-PATH=  ${_PATH_COMPONENTS:ts:}
+_PATH_COMPONENTS= \
+       ${PREPEND_PATH:[-1..1]} \
+       ${_PATH_ORIG:S, ,__space_in_path__,gW:S,:, ,g}
+PATH=  ${_PATH_COMPONENTS:ts::S,__space_in_path__, ,g}
 
 ################################################################
 # Many ways to disable a package.
diff -r 278f4a960a9d -r f3ea9bccbe69 regress/path/spec
--- a/regress/path/spec Sun Feb 09 22:28:58 2020 +0000
+++ b/regress/path/spec Sun Feb 09 22:39:20 2020 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: spec,v 1.1 2020/02/09 22:28:58 rillig Exp $
+# $NetBSD: spec,v 1.2 2020/02/09 22:39:21 rillig Exp $
 #
 # Ensures that the PATH variable can contain spaces, and that commands in
 # such directories can be found and executed.
@@ -19,8 +19,6 @@
 check_result() {
        exit_status 0
 
-       # FIXME: the spaces must be preserved.
-       output_require ":/Path:with:spaces:"
-       # FIXME: the spaces must be preserved.
-       output_require "/Path:with:spaces$"
+       output_require ":/Path with spaces:"
+       output_require "/Path with spaces$"
 }



Home | Main Index | Thread Index | Old Index