Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not skip %prep when doing next round of %dynamic_buildrequires #1247

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions mock/py/mockbuild/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,6 @@ def get_command(mode):
# We want to (re-)write src.rpm with dynamic BuildRequires,
# but with short-circuit it doesn't matter
mode = ['-ba']
# rpmbuild -br already does %prep, so we don't need waste time
# on re-doing it
mode += ['--noprep']

self.buildroot.doChroot(get_command(mode),
shell=False, logger=self.buildroot.build_log, timeout=timeout,
Expand Down
5 changes: 5 additions & 0 deletions releng/release-notes-next/generate_buildrequires.bug
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually quite specific to the python-setupmeta package. I am not sure it describes the problem in a way that is understandable to anybody who is not familiar with that package 🤔

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.
xsuchy marked this conversation as resolved.
Show resolved Hide resolved