The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

pkgutil_4258_gpg.patch

Fixes install status (from Rudy) and fixes package status if use_gpg enabled - Dominic Cleal, 11/11/2010 05:07 pm

Download (924 Bytes)

View differences:

pkgutil.rb 2010-11-11 16:56:59.373588000 +0000
67 67

  
68 68
    # Split the different lines into hashes.
69 69
    def self.blastsplit(line)
70
        if line =~ /\s*(\S+)\s+((\[Not installed\])|(\S+))\s+(\S+)/
70
        # When use_gpg is enabled, pkgutil talks on stdout
71
        return nil if line =~ /^Checking integrity /
72
        # And gpg talks on stderr about verification results
73
        return nil if line =~ /^gpg: /
74

  
75
        if line =~ /\s*(\S+)\s+(\S+)\s+(.*)/
71 76
            hash = {}
72 77
            hash[:name] = $1
73
            hash[:ensure] = if $2 == "[Not installed]"
78
            hash[:ensure] = if $2 == "notinst"
74 79
                :absent
75 80
            else
76 81
                $2
77 82
            end
78
            hash[:avail] = $5
83
            hash[:avail] = $3
79 84

  
80 85
            if hash[:avail] == "SAME"
81 86
                hash[:avail] = hash[:ensure]