Sha256: ff1323c8d07a95ff78a85e0c1f4afd3ca3557fb571c46983158b2cbf38f5dcc3

Contents?: true

Size: 516 Bytes

Versions: 9

Compression:

Stored size: 516 Bytes

Contents

require_relative 'helper'

module Dply
  module Rpm
    extend Helper

    # libs should include ()(64bit) in their name if 64bit libs
    def self.libs_pkgs_map(libs)
      h = {}
      libs.each { |lib| h[lib] = pkg_list(lib) }
      return h
    end

    class << self
      private

      def pkg_list(lib)
        command = ["rpm", "--queryformat", "%{NAME} ", "-q", "--whatprovides", lib]
        output = cmd command, return_output: true, display: false
        output.strip.split
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dply-0.3.8 lib/dply/rpm.rb
dply-0.3.7 lib/dply/rpm.rb
dply-0.3.6 lib/dply/rpm.rb
dply-0.3.5 lib/dply/rpm.rb
dply-0.3.4 lib/dply/rpm.rb
dply-0.3.3 lib/dply/rpm.rb
dply-0.3.2 lib/dply/rpm.rb
dply-0.3.1 lib/dply/rpm.rb
dply-0.3.0 lib/dply/rpm.rb