diff options
author | wiz <wiz@pkgsrc.org> | 2008-09-25 14:01:46 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2008-09-25 14:01:46 +0000 |
commit | 7bb527e6f77914fb76b970b45c1636bfbe1b1756 (patch) | |
tree | 04223bcf0d9427f59d5ebe36275a63c52b50da9e /mk | |
parent | 07c4bfbb09bf12b698c18bf7349aea52a69deeda (diff) | |
download | pkgsrc-7bb527e6f77914fb76b970b45c1636bfbe1b1756.tar.gz |
Fix a longstanding bug in the pkginstall infrastructure: incomplete
support for creating empty files as CONF_FILES.
The usual way is to add
CONF_FILES= /dev/null /some/file
However, some parts of the infrastructure check if the "source" is a
file -- this fails for /dev/null obviously (other parts accept
character devices already).
Fix this. Will follow up with PKGREVISION bumps for affected packages.
Ok during freeze: agc@
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pkginstall/files | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/pkginstall/files b/mk/pkginstall/files index a8611cff65a..0b13f497324 100644 --- a/mk/pkginstall/files +++ b/mk/pkginstall/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.5 2008/01/04 21:50:27 heinz Exp $ +# $NetBSD: files,v 1.6 2008/09/25 14:01:46 wiz Exp $ # # Generate a +FILES script that reference counts config files that are # required for the proper functioning of the package. @@ -152,14 +152,14 @@ ADD) "") ;; *) ${ECHO} "$f_mode $f_user $f_group" > $perms ;; esac - if ${TEST} ! -f "$file" -a ! -f "$f_eg"; then + if ${TEST} ! -f "$file" -a ! -f "$f_eg" -a ! -c "$f_eg"; then : else case "$f_flags:$_PKG_CONFIG:$_PKG_RCD_SCRIPTS" in *f*:*:*|[!r]:yes:*|[!r][!r]:yes:*|[!r][!r][!r]:yes:*|*r*:yes:yes) if ${TEST} -f "$file"; then ${ECHO} "${PKGNAME}: $file already exists" - elif ${TEST} -f "$f_eg"; then + elif ${TEST} -f "$f_eg" -o -c "$f_eg"; then ${ECHO} "${PKGNAME}: copying $f_eg to $file" ${CP} $f_eg $file case $f_user in @@ -209,7 +209,7 @@ REMOVE) "") if ${TEST} -f "$preexist"; then : - elif ${TEST} -f "$file" -a -f "$f_eg" && \ + elif ${TEST} -f "$file" -a \( -f "$f_eg" -o -c "$f_eg" \) && \ ${CMP} -s "$file" "$f_eg"; then case "$f_flags:$_PKG_CONFIG:$_PKG_RCD_SCRIPTS" in *f*:*:*|[!r]:yes:*|[!r][!r]:yes:*|[!r][!r][!r]:yes:*|*r*:yes:yes) |