Commit fb88f636 authored by Leo's avatar Leo

add pkgname_dirname_mismatch

parent a405c501
......@@ -77,6 +77,11 @@ The APKBUILD has duplicate checkdepends. One of them must be removed.
Declaring duplicate dependencies is superfluous.
## pkgname_dirname_mismatch
The pkgname variable of the APKBUILD has value *foo* but the directory in which the
APKBUILD is found is not named *foo*
# TAGS (apkbuild-lint)
The following tags are used by the *apkbuild-lint* program
......
......@@ -120,6 +120,21 @@ duplicate_package() {
done
}
pkgname_dirname_mismatch() {
[ "$SKIP_PKGNAME_DIRNAME_MISMATCH" ] && return 0
local _dirname=
case "${apkbuild%%/*}" in
main|community|testing|unmaintained|non-free)
_dirname="${apkbuild%/*}"
_dirname="${_dirname##*/}"
;;
*) return 0 ;;
esac
if [ "$pkgname" != "$_dirname" ]; then
printf "$apkbuild:: pkgname is '$pkgname' but is in directory '$_dirname'\n"
fi
}
for apkbuild; do
if [ -f "$apkbuild" ]; then
......@@ -162,6 +177,8 @@ for apkbuild; do
duplicate_package &
fi
pkgname_dirname_mismatch &
wait
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment