diff --git a/abuild.in b/abuild.in
index ed58d8ab11d92e5eb32f1656795b5d2866f4a905..4fefbad92d34fda0c80ec70d146c6557a517c586 100755
--- a/abuild.in
+++ b/abuild.in
@@ -721,8 +721,8 @@ up2date() {
 depparse_aports() {
 	# lets run this in a subshell since we source all APKBUILD here
 	(
-	aportsdir=$(realpath ${APKBUILD%/APKBUILD}/../..)
-	for i in $aportsdir/*/*/APKBUILD; do
+	aportsdir=$(realpath ${APKBUILD%/APKBUILD}/..)
+	for i in $aportsdir/*/APKBUILD; do
 		pkgname=
 		subpackages=
 		depends=