From 0d66d5a72c85d7f2709be344b9c64993489a63ef Mon Sep 17 00:00:00 2001 From: "michael.sgarbossa" Date: Fri, 16 Jun 2017 21:34:51 -0700 Subject: fix AIX rpm data Signed-off-by: michael.sgarbossa --- lib/ohai/plugins/packages.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ohai/plugins/packages.rb b/lib/ohai/plugins/packages.rb index 52a87c8b..d1349d06 100644 --- a/lib/ohai/plugins/packages.rb +++ b/lib/ohai/plugins/packages.rb @@ -94,8 +94,14 @@ Ohai.plugin(:Packages) do # Package Name:Fileset:Level # On aix, filesets are packages and levels are versions pkgs.each do |pkg| - _, name, version = pkg.split(":") - packages[name] = { "version" => version } + name, fileset, version, _, _, _, pkg_type = pkg.split(":") + if pkg_type == 'R' + # RPM + packages[name] = { "version" => version } + else + # LPP + packages[fileset] = { "version" => version } + end end end -- cgit v1.2.1