From 2080de14145f4bbf07737fc712f883e0ecc0b01d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Apr 2015 18:41:01 +0200 Subject: [PATCH] hooks/pkglint: check that all files in conf_files really exist. --- common/hooks/pre-pkg/99-pkglint.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index 582686828d5..14a20c386f5 100644 --- a/common/hooks/pre-pkg/99-pkglint.sh +++ b/common/hooks/pre-pkg/99-pkglint.sh @@ -6,6 +6,7 @@ hook() { set +E + # Check for forbidden directories that are symlinks in void. for f in bin sbin lib lib32; do if [ -d ${PKGDESTDIR}/${f} ]; then msg_red "${pkgver}: /${f} directory is not allowed, use /usr/${f}.\n" @@ -18,6 +19,15 @@ hook() { error=1 fi done + + # Check that configuration files really exist. + for f in ${conf_files}; do + if [ ! -f ${PKGDESTDIR}/${f} ]; then + msg_red "${pkgver}: '$f' configuration file not in PKGDESTDIR!\n" + error=1 + fi + done + if [ $error -gt 0 ]; then msg_error "${pkgver}: cannot continue with installation!\n" fi