#46 WIP: dependecies from conflicts
Closed 2 years ago by vondruch. Opened 2 years ago by pvalena.
rpms/ pvalena/ruby rebase  into  master

file modified
+4 -1
@@ -6,7 +6,8 @@ 

    module Helpers

      # Expands '~>' and '!=' gem requirements.

      def self.expand_requirement(requirements)

-       requirements.inject([]) do |output, r|

+       has_conflict = !!requirements.detect { |op, _| op == '!=' }

+       new_req = requirements.inject([]) do |output, r|

          output.concat case r.first

          when '~>'

            expand_pessimistic_requirement(r)
@@ -22,6 +23,8 @@ 

            [r]

          end

        end.reject {|r| r.empty? }

+       new_req = [['>=', Gem::Version.new(0)]] if has_conflict && new_req.empty?

+       new_req

      end

  

      # Expands the pessimistic version operator '~>' into equivalent '>=' and

rubygem.req: Generate dependencies from conflicts

Please do not merge yet.


I am not sure whether this was not implemented by some other way.

It used to be like this, now there is conflicts generator:

https://src.fedoraproject.org/rpms/ruby/blob/master/f/rubygems.con

So unless I'm missing something, I reject this PR.

Pull-Request has been closed by vondruch

2 years ago