-
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.
Only %prep once when running %generate_buildrequires multiple times
This saves time and IO and I believe this is what was originally intended. While doing this I moved some code around. Namely: - moved the variables used only in the if dynamic_buildrequires block inside it - ensured the --nodeps for the final rpmbuild call is only added once
- Loading branch information
Showing
2 changed files
with
34 additions
and
10 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
22 changes: 22 additions & 0 deletions
22
releng/release-notes-next/generate_buildrequires_prep.feature
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,22 @@ | ||
Only run the `%prep` section once when running `%generate_buildrequires` | ||
multiple times. | ||
Previously Mock run `%prep` repeatedly before each `%generate_buildrequires` | ||
round except for the last one. | ||
This was inconsistent and unnecessary slow/wasteful. | ||
|
||
When the original support for `%generate_buildrequires` landed into Mock, | ||
the intention was to only call `%prep` once. | ||
However when Mock added support for multiple rounds of | ||
`%generate_buildrequires`, `%prep` ended up only being skipped in the final | ||
`rpmbuild` call. This was an oversight. | ||
`%prep` is now only called once, as originally intended. | ||
|
||
Some RPM packages might be affected by the change, especially if a dirty | ||
working directory after running `%generate_buildrequires` affects the results | ||
of subsequent rounds of `%generate_buildrequires`. | ||
However, such behavior was undefined and quite buggy even previously, | ||
due to the lack of the `%prep` section in the final `rpmbuild` call. | ||
|
||
Packages that need to run commands before every round of | ||
`%generate_buildrequires` should place those commands in | ||
the `%generate_buildrequires` section itself rather than `%prep`. |