Commit 7326f29a authored by Leo's avatar Leo

replace makedepend-in-depends with a more expensive and better version.

parent 5d858229
......@@ -82,11 +82,13 @@ 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
## depends-makedepends-checkdepends-overlap
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
A package is present in 2 to 3 of the 3 types of following dependencies: depends,
makedepends and checkdepends. All of them are installed during creation of the package,
please specify only once in the lowest common denominator location.
## checkdepend-in-depends
# TAGS (apkbuild-lint)
......
......@@ -136,14 +136,30 @@ pkgname_dirname_mismatch() {
fi
}
makedepend_in_depends() {
[ "$SKIP_MAKEDEPEND_IN_DEPENDS" ] && return 0
local _mkdeps
depends_makedepends_checkdepends_overlap() {
[ "$SKIP_DEPENDS_MAKEDEPENDS_CHECKDEPENDS_OVERLAP" ] && return 0
local _mkdeps _ckdeps d
_mkdeps="$(echo $makedepends | tr " " "\\n" | sort -u)"
_ckdeps="$(echo $checkdepends | tr " " "\\n" | sort -u)"
[ -z "$_mkdeps" ] && [ -z "$_ckdeps" ] && return 0
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
# Don't check against checkdepends if it is empty
[ -z "$checkdepends" ] && continue
if printf "%s\\n" "$_ckdeps" | grep -q "^$d$"; then
printf "%s:: dependency '%s' is in depends and checkdepends\n" "$apkbuild" "$d"
fi
done
# Don't check against checkdepends if it is empty
[ -z "$checkdepends" ] && return 0
for d in $makedepends; do
if printf "%s\\n" "$_ckdeps" | grep -q "^$d$"; then
printf "%s:: dependency '%s' is in makedepends and checkdepends\n" "$apkbuild" "$d"
fi
done
}
......@@ -176,10 +192,7 @@ for apkbuild; do
if [ ! -z "$makedepends" ]; then
upper_repo_makedepends &
duplicate_makedepends &
fi
if [ "$makedepends" ] && [ "$depends" ]; then
makedepend_in_depends &
depends_makedepends_checkdepends_overlap &
fi
if [ ! -z "$checkdepends" ]; then
......
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