summaryrefslogtreecommitdiff
path: root/mk/pkginstall/files
diff options
context:
space:
mode:
authorwiz <wiz>2008-09-25 14:01:46 +0000
committerwiz <wiz>2008-09-25 14:01:46 +0000
commit82647e30b191a30fee4fa87b30bef538c3fc6780 (patch)
tree04223bcf0d9427f59d5ebe36275a63c52b50da9e /mk/pkginstall/files
parent2d861f91774315ce7afce65d150ef4b9214ad140 (diff)
downloadpkgsrc-82647e30b191a30fee4fa87b30bef538c3fc6780.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/pkginstall/files')
-rw-r--r--mk/pkginstall/files8
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)