Sha256: 6155c3705f5f4041af97be359ecba35ec0ea9997b2b0287a7ad770e918954b76
Contents?: true
Size: 755 Bytes
Versions: 13
Compression:
Stored size: 755 Bytes
Contents
require 'dply/helper' module Dply class Rpm include Helper def libs_to_packages(libs) packages = Set.new libs.each do |l| list = whatprovides(l) packages << list if not list.empty? end return packages end def filtered?(pkg) @filtered ||= ["glibc", "libgcc", "libstdc++", "openssl", "ruby-alt", "jemalloc"] @filtered.include? pkg.strip end def whatprovides(lib) lib = "#{lib}()(64bit)" command = %(rpm --queryformat "%{NAME} " -q --whatprovides "#{lib}") logger.debug command output = `#{command}` error "running command #{command}" if not $?.exitstatus == 0 list = output.strip.split.select {|pkg| not filtered? pkg } end end end
Version data entries
13 entries across 13 versions & 1 rubygems