Use 'with' operator in RPM dependency generator.

This commit is contained in:
Vít Ondruch 2018-02-01 17:27:39 +01:00
parent 5624addc78
commit b15350c441
2 changed files with 8 additions and 4 deletions

View File

@ -1063,6 +1063,7 @@ make check TESTS="-v $DISABLE_TESTS"
* Tue Feb 13 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.0-89 * Tue Feb 13 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.0-89
- Drop obsolete ldconfig scriptlets. - Drop obsolete ldconfig scriptlets.
- Add GMP dependency. - Add GMP dependency.
- Use 'with' operator in RPM dependency generator.
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-89 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-89
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -52,11 +52,14 @@ module RubyGemsReq
# Report all gem dependencies including their version. # Report all gem dependencies including their version.
def self.gem_depenencies(specification) def self.gem_depenencies(specification)
specification.runtime_dependencies.each do |dependency| specification.runtime_dependencies.each do |dependency|
Helpers::requirement_versions_to_rpm(dependency.requirement).each do |requirement| dependency_strings = Helpers::requirement_versions_to_rpm(dependency.requirement).map do |requirement|
dependency_string = "rubygem(#{dependency.name})" requirement_string = "rubygem(#{dependency.name})"
dependency_string += " #{requirement}" if requirement && requirement.length > 0 requirement_string += " #{requirement}" if requirement && requirement.length > 0
puts dependency_string requirement_string
end end
dependency_string = dependency_strings.join(' with ')
dependency_string.prepend('(').concat(')') if dependency_strings.length > 1
puts dependency_string
end end
end end