From f08ae8493812b4e6d706431c39dddff90500a389 Mon Sep 17 00:00:00 2001 From: Paul Donohue Date: Tue, 8 Nov 2022 11:00:23 -0500 Subject: 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 (cherry picked from commit 0d6429a4d9498786491a7b806a775585d806f96e) --- rpmbuild.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.1