. $(dirname ${0})/qa-include
- function check() {
- local dir=${1}
+ DESC="The filelayout should comply to the FHS."
- log " ...${dir}"
-DIRS="/etc/init.d /etc/rc.d /lib/pkgconfig /usr/etc /usr/libexec /usr/local /usr/man /usr/var"
++DIRS="/etc/init.d /etc/rc.d /lib/pkgconfig /usr/etc /usr/libexec /usr/local /usr/man /usr/usr /usr/var"
- if [ -d "${BUILDROOT}/${dir}" ]; then
- log "ERROR: This directory should not be there: ${dir}"
- exit 1
- fi
- }
+ function check() {
+ local failed=0
- log "Check directory layout"
+ local dir
+ for dir in ${DIRS}; do
+ if [ -d "${BUILDROOT}${dir}" ]; then
+ log_error "Bad directory: ${dir}"
+ failed=1
+ fi
+ done
- log " Checking for directories that should not be there"
- check /etc/init.d
- check /etc/rc.d
- check /lib/pkgconfig
- check /usr/etc
- check /usr/local
- check /usr/man
- check /usr/usr
- check /usr/var
+ return ${failed}
+ }
- exit 0
+ run