35: def self.blastlist(hash)
36: command = ["-c"]
37:
38: command << hash[:justme] if hash[:justme]
39:
40: output = Puppet::Util::Execution::withenv(:PAGER => "/usr/bin/cat") { pkgget command }
41:
42: list = output.split("\n").collect do |line|
43: next if line =~ /^#/
44: next if line =~ /^WARNING/
45: next if line =~ /localrev\s+remoterev/
46:
47: blastsplit(line)
48: end.reject { |h| h.nil? }
49:
50: if hash[:justme]
51: return list[0]
52: else
53: list.reject! { |h|
54: h[:ensure] == :absent
55: }
56: return list
57: end
58:
59: end