Issue #15159 has been updated by Joshua Corbin.

Now that I look at details again, this may have to do with the lsbdistrelease 
fact instead:

    $ cat /etc/redhat-release
    CentOS release 6.2 (Final)

    $ uname -a
    Linux noni0 2.6.32-220.23.1.el6.centos.plus.x86_64 #1 SMP Tue Jun 19 
04:14:37 BST 2012 x86_64 x86_64

    $ rpm -qa facter
    facter-1.6.10-1.el6.x86_64

    $ facter kernel lsbmajdistrelease lsbdistrelease
    kernel => Linux
    lsbdistrelease =>
    lsbmajdistrelease =>

    $ grep -hv ^# /usr/lib/ruby/site_ruby/1.8/facter/lsb{,maj}distrelease.rb

    Facter.add(:lsbdistrelease) do
      confine :kernel => [ :linux, :"gnu/kfreebsd" ]
      setcode do
        Facter::Util::Resolution.exec('lsb_release -r -s 2>/dev/null')
      end
    end

    require 'facter'

    Facter.add("lsbmajdistrelease") do
      confine :kernel => %w{Linux GNU/kFreeBSD}
      setcode do
        if /(\d*)\./i =~ Facter.value(:lsbdistrelease)
          result=$1
        else
          result=Facter.value(:lsbdistrelease)
        end
        result
      end
    end

So it looks to me like the confine match in lsbmajdistrelease is working, but 
the one in lsbdistrelease isn't due to using the :linux symbol rather than the 
string "Linux".
----------------------------------------
Bug #15159: lsbmajdistrelease is undefined on RedHat with Facter 1.6.6
https://projects.puppetlabs.com/issues/15159#change-65571

Author: Joshua Corbin
Status: Unreviewed
Priority: High
Assignee: 
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.6.6


Systems running 1.6.4 work fine, not sure about 1.6.5.

The problem appears to be a regression introduced by 
commit:2eb4ede4eb7e5bc66fc11cbef0c9fa80c245c662, which confined 
lsbmajdistrelease to systems with operatingsystem set to "Linux" or 
"GNU/kFreeBSD".  The linux distro names, like "CentOS", "RedHat", "Debian", 
"Ubuntu" need to be returned to the confine match in lsbmajdistrelease.rb.



-- 
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