-
Notifications
You must be signed in to change notification settings - Fork 148
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
Implement rich dependencies in gem2rpm templates #10025
Implement rich dependencies in gem2rpm templates #10025
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust you… ;)
For most templates this is pretty straight forward, but for foreman_plugin.spec.erb it combines asset reequirements into the spec.extensions block. That was already using the more modern runtime_requirements.virtualize methods to generate a correct rpm dependency list. This was never noticed because we (thankfully) don't have foreman plugins with native extensions.
e053547
to
a7a0cbd
Compare
I've merged the block that requires gcc and declares it as noarch in a simple if/else condition. Hopefully the end blocks are a bit easier to follow now. |
<% build_requires = dep.requirement.map { |req| requirement(dep.name, req) } -%> | ||
BuildRequires: <%= build_requires.size > 1 ? "(#{build_requires.join(' with ')})" : build_requires.first %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fedora-ruby/gem2rpm#124 would make this:
<% build_requires = dep.requirement.map { |req| requirement(dep.name, req) } -%> | |
BuildRequires: <%= build_requires.size > 1 ? "(#{build_requires.join(' with ')})" : build_requires.first %> | |
BuildRequires: <%= dep.to_rich_rpm %> |
For most templates this is pretty straight forward, but for foreman_plugin.spec.erb it combines asset reequirements into the spec.extensions block. That was already using the more modern runtime_requirements.virtualize methods to generate a correct rpm dependency list. This was never noticed because we (thankfully) don't have foreman plugins with native extensions.