summaryrefslogtreecommitdiff
path: root/mk/pkginstall
diff options
context:
space:
mode:
authorrillig <rillig>2007-11-23 11:36:19 +0000
committerrillig <rillig>2007-11-23 11:36:19 +0000
commit850df74b30b4bd12a89b122c794f037fed7b70f7 (patch)
treec6b81fecc4e2436ac7c687af7cb249035cd0b36a /mk/pkginstall
parent56a715e269aa0425eb8245b5d28723644462e6bd (diff)
downloadpkgsrc-850df74b30b4bd12a89b122c794f037fed7b70f7.tar.gz
After a package is installed, make sure that the example files for
CONF_FILES and similar exist, since the pkginstall framework skips them silently, which is not a good idea. For example I just installed dovecot, and there was neither a configuration file installed nor a message that a configuration file exists at all.
Diffstat (limited to 'mk/pkginstall')
-rw-r--r--mk/pkginstall/bsd.pkginstall.mk37
1 files changed, 36 insertions, 1 deletions
diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk
index 1c4c6a2f7b3..b9cfbaf091d 100644
--- a/mk/pkginstall/bsd.pkginstall.mk
+++ b/mk/pkginstall/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.34 2007/10/10 11:42:36 rillig Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.35 2007/11/23 11:36:19 rillig Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -413,6 +413,41 @@ _INSTALL_FILES_DATAFILE= ${_PKGINSTALL_DIR}/files-data
_INSTALL_UNPACK_TMPL+= ${_INSTALL_FILES_FILE}
_INSTALL_DATA_TMPL+= ${_INSTALL_FILES_DATAFILE}
+privileged-install-hook: _pkginstall-postinstall-check
+_pkginstall-postinstall-check: .PHONY
+ ${RUN} p="${DESTDIR}${PREFIX}"; \
+ ${_FUNC_STRIP_PREFIX}; \
+ set args ${RCD_SCRIPTS}; shift; \
+ while [ $$# -gt 0 ]; do \
+ egfile=$$p/`strip_prefix "${RCD_SCRIPTS_EXAMPLEDIR}/$$1"`; \
+ shift 1; \
+ [ -f "$$egfile" ] || ${FAIL_MSG} "RCD_SCRIPT $$egfile does not exist."; \
+ done; \
+ set args ${CONF_FILES}; shift; \
+ while [ $$# -gt 0 ]; do \
+ egfile=$$p/`strip_prefix "$$1"`; \
+ shift 2; \
+ [ -f "$$1" ] || ${FAIL_MSG} "CONF_FILE $$egfile does not exist."; \
+ done; \
+ set args ${REQD_FILES}; shift; \
+ while [ $$# -gt 0 ]; do \
+ egfile=$$p/`strip_prefix "$$1"`; \
+ shift 2; \
+ [ -f "$$1" ] || ${FAIL_MSG} "REQD_FILE $$egfile does not exist."; \
+ done; \
+ set args ${CONF_FILES_PERMS}; shift; \
+ while [ $$# -gt 0 ]; do \
+ egfile=$$p/`strip_prefix "$$1"`; \
+ shift 5; \
+ [ -f "$$1" ] || ${FAIL_MSG} "CONF_FILES_PERMS $$egfile does not exist."; \
+ done; \
+ set args ${REQD_FILES_PERMS}; shift; \
+ while [ $$# -gt 0 ]; do \
+ egfile=$$p/`strip_prefix "$$1"`; \
+ shift 5; \
+ [ -f "$$1" ] || ${FAIL_MSG} "REQD_FILES_PERMS $$egfile does not exist."; \
+ done
+
${_INSTALL_FILES_DATAFILE}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \