diff --git a/abuild.in b/abuild.in
index 175c227e05375b848f6343c125b2321a208b7d23..10cd2119e5330962a7620535a8efe5ead49e1321 100755
--- a/abuild.in
+++ b/abuild.in
@@ -219,7 +219,7 @@ sanitycheck() {
 
 md5check() {
 	local dummy f endreturnval originalparams origin file
-	if [ -z "$source" ]; then
+	if [ -z "$source" ] && [ -z "$md5sums" ]; then
 		return 0
 	fi
 	if [ -z "$md5sums" ]; then