Skip to content

Commit

Permalink
rpmbuild: Generate src.rpm with dynamic BRs with --force
Browse files Browse the repository at this point in the history
There is no way to get src.rpm with dynamic BuildRequires without
checking dependencies on the system. --nodeps always forces rpmbuild to
write buildreqs.nosrc.rpm, but in some cases it might be desired to get
src.rpm with dynamic BRs but without checking for dependencies.

Closes: #760
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
  • Loading branch information
ignatenkobrain authored and ffesti committed Jul 2, 2019
1 parent 311815b commit e672ec2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/build.c
Expand Up @@ -305,7 +305,8 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
(rc == RPMRC_MISSINGBUILDREQUIRES))
rc = doCheckBuildRequires(ts, spec, test);
if (rc == RPMRC_MISSINGBUILDREQUIRES) {
if (what & RPMBUILD_DUMPBUILDREQUIRES) {
if ((what & RPMBUILD_DUMPBUILDREQUIRES) &&
!(spec->flags & RPMSPEC_FORCE)) {
/* Create buildreqs package */
char *nvr = headerGetAsString(spec->packages->header, RPMTAG_NVR);
rasprintf(&spec->sourceRpmName, "%s.buildreqs.nosrc.rpm", nvr);
Expand Down

0 comments on commit e672ec2

Please sign in to comment.