diff options
Diffstat (limited to 'common/hooks/pre-pkg/99-pkglint.sh')
-rw-r--r-- | common/hooks/pre-pkg/99-pkglint.sh | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index e17c5231a14..834bdb0a682 100644 --- a/common/hooks/pre-pkg/99-pkglint.sh +++ b/common/hooks/pre-pkg/99-pkglint.sh @@ -3,6 +3,7 @@ hook() { local error=0 filename= rev= libname= conflictPkg= conflictFile= local conflictRev= ignore= found= mapshlibs=$XBPS_COMMONDIR/shlibs + local emptypkg=yes set +E @@ -36,9 +37,9 @@ hook() { msg_red "${pkgver}: File /* is not allowed\n" error=1 fi - # Empty meta package is fine ;; lib|bin|sbin|lib64|lib32|usr|var|opt|etc|boot|srv) + emptypkg=no ;; INSTALL|INSTALL.msg|REMOVE|REMOVE.msg|rdeps|shlib-requires|shlib-provides) if [ ! -f "${PKGDESTDIR}/$f" ]; then @@ -53,6 +54,12 @@ hook() { esac done + # Forbid empty packages unless build_style=meta + if [ "$build_style" != meta -a "$emptypkg" != no ]; then + msg_red "${pkgver}: PKGDESTDIR is empty and build_style != meta\n" + error=1 + fi + # Check that configuration files really exist. for f in $(expand_destdir "${conf_files}"); do if [ ! -f "${PKGDESTDIR}/${f}" ]; then @@ -114,14 +121,6 @@ hook() { 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 - msg_red "${pkgver}: PKGDESTDIR is empty and build_style != meta\n" - error=1 - fi - fi - if [ $error -gt 0 ]; then msg_error "${pkgver}: cannot continue with installation!\n" fi |