hooks/pkglint: check that all files in conf_files really exist.

This commit is contained in:
Juan RP 2015-04-05 18:41:01 +02:00
parent b589d1fd4e
commit 2080de1414
1 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,7 @@ hook() {
set +E set +E
# Check for forbidden directories that are symlinks in void.
for f in bin sbin lib lib32; do for f in bin sbin lib lib32; do
if [ -d ${PKGDESTDIR}/${f} ]; then if [ -d ${PKGDESTDIR}/${f} ]; then
msg_red "${pkgver}: /${f} directory is not allowed, use /usr/${f}.\n" msg_red "${pkgver}: /${f} directory is not allowed, use /usr/${f}.\n"
@ -18,6 +19,15 @@ hook() {
error=1 error=1
fi fi
done 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 if [ $error -gt 0 ]; then
msg_error "${pkgver}: cannot continue with installation!\n" msg_error "${pkgver}: cannot continue with installation!\n"
fi fi