Class: LinuxAdmin::Rpm
- Inherits:
-
LinuxAdmin
- Object
- LinuxAdmin
- LinuxAdmin::Rpm
- Defined in:
- lib/linux_admin/rpm.rb
Constant Summary
Constants inherited from LinuxAdmin
Class Method Summary collapse
Methods included from Common
Class Method Details
.list_installed ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/linux_admin/rpm.rb', line 3 def self.list_installed out = run("rpm -qa --qf \"%{NAME} %{VERSION}-%{RELEASE}\n\"", :return_output => true) out.split("\n").each_with_object({}) do |line, pkg_hash| name, ver = line.split(" ") pkg_hash[name] = ver end end |