Panu Matilainen f38479
From d220e0063e836ba14806c7efb2a85d1be04cd673 Mon Sep 17 00:00:00 2001
Panu Matilainen f38479
Message-Id: <d220e0063e836ba14806c7efb2a85d1be04cd673.1650979848.git.pmatilai@redhat.com>
Panu Matilainen f38479
From: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen f38479
Date: Tue, 26 Apr 2022 16:27:10 +0300
Panu Matilainen f38479
Subject: [PATCH] Fix regression on dynamic buildrequires with -ba --nodeps
Panu Matilainen f38479
 (RhBug:2078744)
Panu Matilainen f38479
Panu Matilainen f38479
---
Panu Matilainen f38479
 rpmbuild.c | 5 +++--
Panu Matilainen f38479
 1 file changed, 3 insertions(+), 2 deletions(-)
Panu Matilainen f38479
Panu Matilainen f38479
diff --git a/rpmbuild.c b/rpmbuild.c
Panu Matilainen f38479
index da3810f75..377d672a7 100644
Panu Matilainen f38479
--- a/rpmbuild.c
Panu Matilainen f38479
+++ b/rpmbuild.c
Panu Matilainen f38479
@@ -673,9 +673,10 @@ int main(int argc, char *argv[])
Panu Matilainen f38479
 	/* fallthrough */
Panu Matilainen f38479
     case 'd':
Panu Matilainen f38479
 	ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
Panu Matilainen f38479
-	ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
Panu Matilainen f38479
-	if (!noDeps)
Panu Matilainen f38479
+	if ((buildChar == 'd' || buildChar == 'r') || noDeps == 0) {
Panu Matilainen f38479
+	    ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
Panu Matilainen f38479
 	    ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
Panu Matilainen f38479
+	}
Panu Matilainen f38479
 	if ((buildChar == 'r' || buildChar == 'd') && shortCircuit)
Panu Matilainen f38479
 	    break;
Panu Matilainen f38479
 	/* fallthrough */
Panu Matilainen f38479
-- 
Panu Matilainen f38479
2.35.1
Panu Matilainen f38479