Issue #11658 has been updated by Lucas Yamanishi.
Depending on LSB is less than ideal. It's possible, and sometimes desirable,
to uninstall all of the LSB packages on which the LSB facts depend. Debian
systems provide **_/etc/os-release_** in the _base-files_ package.
<pre>
NAME="Ubuntu"
VERSION="12.04.2 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.2 LTS)"
VERSION_ID="12.04"
</pre>
<pre><code class="ruby">
setcode do
release = Facter::Util::Resolution.exec('cat /etc/os-release')
if release =~ /^VERSION="(\d+\.\d+)/
$1
elsif release =~ /^PRETTY_NAME="(\d+\.\d+)/
$1
elsif release =~ /^VERSION_ID="(\d+\.\d+)/
$1
end
end
</code></pre>
----------------------------------------
Bug #11658: Noticed operatingsystemrelease isn't trying to use lsbdistrelease
on Linux boxes
https://projects.puppetlabs.com/issues/11658#change-89454
* Author: Joe McDonagh
* Status: Accepted
* Priority: Normal
* Assignee: Hailee Kenney
* Category: library
* Target version: 2.x
* Keywords:
* Branch:
* Affected Facter version: 1.6.4
----------------------------------------
Causing some of my code to fail on the upcoming Ubuntu LTS 12.04. Basically
it's got a ton of conditionals in this file, which I can see the utility of
having in case LSB isn't available. However, I think the more clever, and
proper way to handle this, is on Facter.value(:kernel) == "Linux", first try to
use lsbdistrelease to fill in operatingsystemrelease if it's there, then fall
back to these sort of rough around the edges determination methods if it's not
available.
This is what the fact operatingsystemrelease shows on my 12.04 test box:
operatingsystemrelease => 3.2.0-2-generic
This is cause it can't glean the info from /etc/issue (which is a pretty
unreliable place to look for OS info) so it uses kernelrelease... I am kind of
depending on a version here which is the other problem. Should this fact
contain strings? I'd have a patch ready for you guys but I think this is a
design question really...
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.