diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index d0a2680808..d2c281e39d 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