diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2020-04-17 12:35:11 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2020-04-17 12:35:11 +0000 |
commit | ac85196f1f843619074d6639d9378295263ea73c (patch) | |
tree | d13a2d4ec8927b8a3a03deac147621f5da9acdf2 /mk | |
parent | 9542e74b75adf5a2ce3215848dc880c21e4e5fdd (diff) | |
download | pkgsrc-ac85196f1f843619074d6639d9378295263ea73c.tar.gz |
Pullup ticket #6161 - requested by sborrill
mk/pkginstall: NetBSD 7 bugfix
Revisions pulled up:
- mk/pkginstall/files 1.11
---
Module Name: pkgsrc
Committed By: sborrill
Date: Wed Apr 15 13:33:32 UTC 2020
Modified Files:
pkgsrc/mk/pkginstall: files
Log Message:
Work around a potential shell bug where "${FOO=${BAR%/*}}" does not work
if quoted. Seen on NetBSD 7.
#!/bin/sh
in="/path/to/dir with space/file"
: "${file=${in##*/}}"
: "${dir=${in%/*}}"
echo "dir:$dir"
echo "file:$file"
[ "$dir" = "$file" ] && echo "dir and file are same"
Leads to errors when adding packages such as:
./+FILES: cannot create
/var/db/pkg.refcount/files/etc/rc.d/xenguest//var/db/pkg/xe-guest-utilities-7.0.0:
directory nonexistent
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pkginstall/files | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/pkginstall/files b/mk/pkginstall/files index 33d1361ea05..100f355c392 100644 --- a/mk/pkginstall/files +++ b/mk/pkginstall/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.10 2020/02/11 01:21:25 rillig Exp $ +# $NetBSD: files,v 1.10.2.1 2020/04/17 12:35:11 bsiegert Exp $ # # Generate a +FILES script that reference counts config files that are # required for the proper functioning of the package. @@ -98,8 +98,8 @@ esac CURDIR=`${PWD_CMD}` PKG_METADATA_DIR="${2-${CURDIR}}" -: "${PKGNAME=${PKG_METADATA_DIR##*/}}" -: "${PKG_DBDIR=${PKG_METADATA_DIR%/*}}" +: ${PKGNAME="${PKG_METADATA_DIR##*/}"} +: ${PKG_DBDIR="${PKG_METADATA_DIR%/*}"} : "${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount}" PKG_REFCOUNT_FILES_DBDIR="${PKG_REFCOUNT_DBDIR}/files" |