diff --git a/abuild.in b/abuild.in
index db955f33ddc7c54785583e72be3dcb50921727ae..20f22dfff093a8d20b5aea8848f7671a37732ee2 100755
--- a/abuild.in
+++ b/abuild.in
@@ -969,7 +969,7 @@ builddeps() {
 	fi
 
 	uninstall_after=".makedepends-$pkgname $uninstall_after"
-	if [ -n "$install_deps" ] && [ -z "$recursive" ]; then
+	if [ -n "$install_deps" ] && [ -z "$recursive" ] && [ -n "$deps" ]; then
 		# make a --simluate run first to detect missing deps
 		# apk-tools --virtual is no goot at reporting those.
 		$SUDO $APK add --repository "$abuildrepo" \