From 0c48f210b13430b4c0e1964d6b924eec1395273f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Apr 26 2022 08:20:13 +0000 Subject: Subtle tweak to bug 2078744 fix logic... --- diff --git a/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch b/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch index 283306e..3214413 100644 --- a/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch +++ b/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch @@ -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: From: Panu Matilainen 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;