Skip Menu |

This queue is for tickets about the Linux-Distribution CPAN distribution.

Report information
The Basics
Id: 69671
Status: resolved
Priority: 0/
Queue: Linux-Distribution

People
Owner: Nobody in particular
Requestors: tlhackque [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.20
Fixed in: 0.21



Subject: Fedora version not returned for recent releases
Fedora has removed the word "Core" from it's version string, causing Linux::Distribuion::distribution_version to fail. The current code does work on FC 6, but definitely fails on FC 14 & 15. I don't know exactly where it broke... Attached is a patch with the corrected regex to deal with this. $ uname -a Linux hagrid.example.com 2.6.35.13-91.fc14.x86_64 #1 SMP Tue May 3 13:23:06 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux $ perl -MLinux::Distribution -e'print Linux::Distribution::distribution_version(),"\n"' $ After patch: $ perl -MLinux::Distribution -e'print Linux::Distribution::distribution_version(),"\n"' 14 $ cat /etc/redhat-release Fedora Core release 6 (Zod) cat /etc/redhat-release Fedora release 14 (Laughlin) cat /etc/redhat-release Fedora release 15 (Lovelock)
Subject: ldfedora.patch
--- /usr/local/share/perl5/Linux/Distribution.pm~ 2011-07-21 12:21:17.000000000 -0400 +++ /usr/local/share/perl5/Linux/Distribution.pm 2011-07-21 14:26:38.051037210 -0400 @@ -45,11 +45,11 @@ our %version_match = ( 'gentoo' => 'Gentoo Base System release (.*)', 'debian' => '(.+)', 'suse' => 'VERSION = (.*)', - 'fedora' => 'Fedora Core release (\d+) \(', + 'fedora' => 'Fedora(?: Core)? release (\d+) \(', 'redflag' => 'Red Flag (?:Desktop|Linux) (?:release |\()(.*?)(?: \(.+)?\)', 'redhat' => 'Red Hat Linux release (.*) \(', 'slackware' => '^Slackware (.+)$', 'pardus' => '^Pardus (.+)$', 'centos' => '^CentOS release (.+)(?:\s\(Final\))',
Thanks for reporting the issue. I've added the patch, and tests, to the Linux::Distribution repo in Github. It will be part of the next release. See this commit: https://github.com/chorny/Linux-Distribution/commit/f338c26e8f14c6cd0143a441fcd3886505dfdff4 -- Michiel
From: tlhackque [...] yahoo.com
Glad to help. Looking at the active bugs list, this is one of several "fixed in the next release" - some of which are a lot older than my report. Do you have a plan/estimated date for a next release? I'd rather not have to distribute my software with a release note requring an unofficial patch to Linux::Distribution... On Thu Jul 28 04:51:48 2011, MICHIELB wrote: Show quoted text
> Thanks for reporting the issue. I've added the patch, and tests, to > the > Linux::Distribution repo in Github. It will be part of the next > release. > > See this commit: > https://github.com/chorny/Linux- > Distribution/commit/f338c26e8f14c6cd0143a441fcd3886505dfdff4 > -- > Michiel