Subtle tweak to bug 2078744 fix logic...

This commit is contained in:
Panu Matilainen 2022-04-26 11:20:13 +03:00
parent 5e60ce8fd7
commit 0c48f210b1

View File

@ -1,5 +1,5 @@
From 1bbe9d449543916ae44834c323d1640f2c8486e7 Mon Sep 17 00:00:00 2001
Message-Id: <1bbe9d449543916ae44834c323d1640f2c8486e7.1650960341.git.pmatilai@redhat.com>
From feeeca5148ceadba5fa0af13bfabda0b716566d5 Mon Sep 17 00:00:00 2001
Message-Id: <feeeca5148ceadba5fa0af13bfabda0b716566d5.1650961200.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 26 Apr 2022 11:00:41 +0300
Subject: [PATCH] Fix rpmbuild -br not building .src.rpm regression
@ -10,19 +10,21 @@ in the testsuite and commit ad8b9bd2ca93cf4319680f056bb40bfc24661991
missed this twist in the logic. Fixing is an obvious one-liner now,
add a test to ensure it doesn't happen again.
---
rpmbuild.c | 2 ++
rpmbuild.c | 4 ++++
tests/rpmbuild.at | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
2 files changed, 20 insertions(+)
diff --git a/rpmbuild.c b/rpmbuild.c
index de78976ff..1e8c1ce09 100644
index de78976ff..da3810f75 100644
--- a/rpmbuild.c
+++ b/rpmbuild.c
@@ -667,6 +667,8 @@ int main(int argc, char *argv[])
@@ -667,6 +667,10 @@ int main(int argc, char *argv[])
break;
/* fallthrough */
case 'r':
+ ba->buildAmount |= RPMBUILD_PACKAGESOURCE;
+ /* build src.rpm only on explicit -br */
+ if (buildChar == 'r')
+ ba->buildAmount |= RPMBUILD_PACKAGESOURCE;
+ /* fallthrough */
case 'd':
ba->buildAmount |= RPMBUILD_BUILDREQUIRES;