Commit 5d858229 authored by Leo's avatar Leo

Add makedepend-in-depends

closes #11
parent 1fb476a6
......@@ -82,6 +82,12 @@ Declaring duplicate dependencies is superfluous.
The pkgname variable of the APKBUILD has value *foo* but the directory in which the
APKBUILD is found is not named *foo*
## makedepend-in-depends
A package is present in both makedepends and depends which is superfluous since all
depends are installed alongside the makedepends, the package can be removed from
makedepends
# TAGS (apkbuild-lint)
The following tags are used by the *apkbuild-lint* program
......
......@@ -136,6 +136,17 @@ pkgname_dirname_mismatch() {
fi
}
makedepend_in_depends() {
[ "$SKIP_MAKEDEPEND_IN_DEPENDS" ] && return 0
local _mkdeps
_mkdeps="$(echo $makedepends | tr " " "\\n" | sort -u)"
for d in $depends; do
if printf "%s\\n" "$_mkdeps" | grep -q "^$d$"; then
printf "%s:: dependency '%s' is in depends and makedepends\n" "$apkbuild" "$d"
fi
done
}
for apkbuild; do
if [ -f "$apkbuild" ]; then
......@@ -167,6 +178,10 @@ for apkbuild; do
duplicate_makedepends &
fi
if [ "$makedepends" ] && [ "$depends" ]; then
makedepend_in_depends &
fi
if [ ! -z "$checkdepends" ]; then
if [ ! -z "${options##*!check*}" ]; then
upper_repo_checkdepends &
......
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