# File lib/puppet/provider/package/pkg.rb, line 33
33:   def self.parse_line(line)
34:     hash = {}
35:     if match = self::REGEX.match(line)
36: 
37:       self::FIELDS.zip(match.captures) { |field,value|
38:         hash[field] = value
39:       }
40: 
41:       hash[:provider] = self.name
42:       hash[:error] = "ok"
43: 
44:       if hash[:status] == "installed"
45:         hash[:ensure] = :present
46:       else
47:         hash[:ensure] = :absent
48:       end
49:     else
50:       Puppet.warning "Failed to match 'pkg list' line #{line.inspect}"
51:       return nil
52:     end
53: 
54:     hash
55:   end