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

spec-cleaner moves BuildRequires: inside conditional away #257

Closed
mwilck opened this issue Aug 29, 2019 · 3 comments
Closed

spec-cleaner moves BuildRequires: inside conditional away #257

mwilck opened this issue Aug 29, 2019 · 3 comments

Comments

@mwilck
Copy link

mwilck commented Aug 29, 2019

This spec file contains a section with BuildRequires: inside a conditional:

BuildRequires:  update-desktop-files
if 0%{?with_new_pycups}
# All printer driver packages should have "BuildRequires: cups-rpm-helper"
# for automatic generation of Provides: tags.
BuildRequires:  cups-rpm-helper
%endif

When I run spec-cleaner on it (or format_spec_file, FTM), it moves that section down below all Requires: and Obsoletes:

I wonder if that's intended behavior?

@mwilck
Copy link
Author

mwilck commented Aug 29, 2019

@scarabeusiv
Copy link
Contributor

This is an intended behaviour indeed, the conditions are all moved in one location in the spec. It allows for easier review of all available conditionals later on.

@scarabeusiv
Copy link
Contributor

Basically detecting the conditions and the alphabetic sorting caused all sort of trouble with nested conditions so we had to do something that could be reliably reproducable, and this was least worst of all the posible solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants