summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Donohue <git@PaulSD.com>2022-11-08 11:00:23 -0500
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commitf08ae8493812b4e6d706431c39dddff90500a389 (patch)
tree5c5294cf5609bd0ca515c254dbb99455b1734094
parent848143d86248477e4ce5a583f9b3132fb0a7ca2d (diff)
downloadrpm-f08ae8493812b4e6d706431c39dddff90500a389.tar.gz
Fix regression: -bp should check BuildRequires
Some source packages assume that BuildRequires are installed before %prep is executed. For example, `openssh` BuildRequires `automake` and runs `autoreconf` in %prep. Prior to 11c56d5 `rpmbuild -bp` checked BuildRequires and printed a helpful error message if there were any missing dependencies. Since that commit, `rpmbuild -bp` skips the BuildRequires check, which can lead to misleading errors in %prep. This commit restores the BuildRequires check in `rpmbuild -bp`. Co-authored-by: Florian Festi <ffesti@redhat.com> (cherry picked from commit 0d6429a4d9498786491a7b806a775585d806f96e)
-rw-r--r--rpmbuild.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpmbuild.c b/rpmbuild.c
index cb02b31ba..9b1a7e76b 100644
--- a/rpmbuild.c
+++ b/rpmbuild.c
@@ -674,6 +674,9 @@ int main(int argc, char *argv[])
/* fallthrough */
case 'p':
ba->buildAmount |= RPMBUILD_PREP;
+ if (!noDeps) {
+ ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
+ }
break;
case 'l':
ba->buildAmount |= RPMBUILD_FILECHECK;