From 7c8ab37d362d895ebaf339552db1c6874b92d35c Mon Sep 17 00:00:00 2001 From: Đoàn Trần Công Danh Date: Sun, 8 Mar 2020 14:08:24 +0700 Subject: pkglint: forbid files generated by mimedb trigger --- common/hooks/pre-pkg/99-pkglint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index d0a26808083..d2c281e39db 100644 --- a/common/hooks/pre-pkg/99-pkglint.sh +++ b/common/hooks/pre-pkg/99-pkglint.sh @@ -80,6 +80,15 @@ hook() { error=1 fi + # Forbid files would be generated by mimedb trigger + for f in XMLnamespaces aliases generic-icons globs globs2 icons \ + magic mime.cache subclasses treemagic types version ; do + if [ -f "${PKGDESTDIR}/usr/share/mime/$f" ]; then + msg_red "${pkgver}: /usr/share/mime/$f is forbidden. Delete it.\n" + error=1 + fi + done + # Forbid empty packages unless build_style=meta if [ "$build_style" != "meta" ]; then if [ "$(find $PKGDESTDIR/* -maxdepth 1 -type d 2>/dev/null)" = "" ]; then -- cgit v1.2.3