Skip to content

Commit

Permalink
Update releng/release-notes-next/generate_buildrequires.bug
Browse files Browse the repository at this point in the history
with suggestion from Miro Hroncok

Co-authored-by: Miro Hrončok <[email protected]>
  • Loading branch information
xsuchy and hroncok authored Oct 19, 2023
1 parent c6c1238 commit 9de9ac2
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions releng/release-notes-next/generate_buildrequires.bug
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
Previously Mock skipped %prep section when doing the next round of build of `%generate_buildrequries` to save time.
But we found that when the package deletes `setupmeta.egg-info` in `%prep`, then the next loop can work with incorrect data
and generate incorrect build requires that may not be satisfied.
Mock now calls `%prep` section in every loop. This may result in a few seconds of delay when spec file uses
`%generate_buildrequries`, but generated build dependency is correct now.
To save time, Mock previously skipped the `%prep` section when building
an RPM package after completing the installation of all the requirements
generated by `%generate_buildrequries`.

However, when the `%generate_buildrequries` section has side effects altering
the results of a subsequent run of self,
then the final build may work with different data and generate incorrect
build requirements that may not be actually installed during the build.
In extreme case, it is possible to successfully build a package with
unsatisfiable BuildRequires in the built SRPM metadata.

Mock now calls `%prep` section even during the final build after completing
the installation of all the generated build requirements.
This may result in a few seconds of delay when spec file uses
`%generate_buildrequries` but the source used to generate the build requirements
is more likely to stay consistent during the build,
making it harder to accidentally generate unsatisfied BuildRequires.

0 comments on commit 9de9ac2

Please sign in to comment.