Issue #4980 has been updated by Jesse Wolfe.

Would it be alright to default to `Facter.value(:hardwaremodel)` on all OSes 
that don't have a special case? We could simplify the whole fact to:

<pre>
Facter.add(:architecture) do
    setcode do
        model = Facter.value(:hardwaremodel)
        case model
        # most linuxen use "x86_64"
        when "x86_64"
            case Facter.value(:operatingsystem)
            when "Debian", "Gentoo", "GNU/kFreeBSD"
                "amd64"
            else
                model
            end
        when /(i[3456]86|pentium)/
            case Facter.value(:operatingsystem)
            when "Gentoo"
                "x86"
            else
                "i386"
            end
        else
            model
        end
    end
end
</pre>
----------------------------------------
Bug #4980: Darwin doesn't show architecture fact
https://projects.puppetlabs.com/issues/4980

Author: Nathan Rich
Status: Needs design decision
Priority: Low
Assignee: Nigel Kersten
Category: library
Target version: 
Keywords: 
Branch: 


lib/facter/architecture.rb:
    Facter.add(:architecture) do
      confine :kernel => :openbsd
      setcode do
        architecture = Facter.value(:hardwaremodel)
      end
    end

change to
    Facter.add(:architecture) do
      confine :kernel => [:openbsd, :darwin]
      setcode do
        architecture = Facter.value(:hardwaremodel)
      end
    end


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to