Module: Dply::Rpm

Extended by:
Helper
Defined in:
lib/dply/rpm.rb

Class Method Summary collapse

Methods included from Helper

cmd, error, git, logger, sh, symlink

Class Method Details

.what_provides(lib) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/dply/rpm.rb', line 7

def self.what_provides(lib)
  command = ["rpm", "--queryformat", "%{NAME} ", "-q", "--whatprovides", lib]
  output = cmd command, return_output: true, display: false
  output.strip.split
rescue Error
  logger.command command, mode: :warn
  []
end