-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic BuildRequires: Prevent generation of unsatisfied dependency
When the %generate_buildrequires section behaved unpredictable, it was possible to successfully build a package with unsatisfied BuildRequires. Now, the build will fail. Fixes #1246
- Loading branch information
Showing
2 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
When Mock completes the installation of all the requirements generated | ||
by `%generate_buildrequries`, it calls `rpmbuild -ba` to perform a final build | ||
of the package. | ||
|
||
During the final build, `%generate_buildrequries` runs again in order to | ||
generate a list of `BuildRequires` to be added to the built SRPM metadata. | ||
An arbitrary `%generate_buildrequries` section may generate different | ||
requirements that may not have been installed. | ||
|
||
Previously, the `rpmbuild -ba` call used the `--nodeps` option, | ||
hence it was possible to successfully build a package with | ||
unsatisfiable BuildRequires in the built SRPM metadata. | ||
|
||
The `--nodeps` option is no longer used in the final `rpmbuild -ba` call. | ||
If `%generate_buildrequries` attempts to generate new unsatisfied requirements | ||
during the final build, the build will fail. |