This is an automated email from the git hooks/post-receive script. gregoa pushed a commit to annotated tag v0.22 in repository liblinux-distribution-perl.
commit e1c948988f54d9be8c70ad9079cf748dcfa33667 Author: Michiel Beijen <michiel.bei...@gmail.com> Date: Mon Dec 8 19:56:41 2014 +0000 Added version detection for CentOS 7. --- Changes | 3 ++- MANIFEST | 9 ++++++++- lib/Linux/Distribution.pm | 2 +- t/centos7.t | 14 ++++++++++++++ t/centos7/centos-release | 1 + t/centos7/files | 5 +++++ 6 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index aac7824..e7f4168 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ -* 2013-??-?? version 0.22 +* 2014-12-08 version 0.22 +Fixed version detection fort CentOS 7 (RT#97638) Added OS and version detection for Amazon Linux. (RT#88412) * 2011-02-23 version 0.21 diff --git a/MANIFEST b/MANIFEST index 9449939..c45194e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,16 +1,24 @@ +.travis.yml Build.PL Changes lib/Linux/Distribution.pm Makefile.PL MANIFEST +META.json META.yml Module meta-data (added by MakeMaker) README +t/amazon.t +t/amazon/files +t/amazon/system-release t/centos.t t/centos/files t/centos/redhat-release t/centos6.t t/centos6/centos-release t/centos6/files +t/centos7.t +t/centos7/centos-release +t/centos7/files t/fedora15.t t/fedora15/fedora-release t/fedora15/files @@ -26,4 +34,3 @@ t/rhel6/redhat-release t/scientific6.t t/scientific6/files t/scientific6/redhat-release -META.json diff --git a/lib/Linux/Distribution.pm b/lib/Linux/Distribution.pm index 5444ca5..19c0f00 100644 --- a/lib/Linux/Distribution.pm +++ b/lib/Linux/Distribution.pm @@ -56,7 +56,7 @@ our %version_match = ( 'oracle enterprise linux' => 'Enterprise Linux Server release (.+) \(', 'slackware' => '^Slackware (.+)$', 'pardus' => '^Pardus (.+)$', - 'centos' => '^CentOS(?: Linux)? release (.+)(?:\s\(Final\))', + 'centos' => '^CentOS(?: Linux)? release (.+) \(', 'scientific' => '^Scientific Linux release (.+) \(', 'amazon' => 'Amazon Linux AMI release (.+)$', ); diff --git a/t/centos7.t b/t/centos7.t new file mode 100644 index 0000000..e926dfb --- /dev/null +++ b/t/centos7.t @@ -0,0 +1,14 @@ +use 5.006000; +use strict; +use warnings; + +use Test::More tests => 2; +use lib '../lib/'; +use Linux::Distribution; + +local $Linux::Distribution::release_files_directory='t/centos7/'; +my $linux = Linux::Distribution->new; +my $distro = $linux->distribution_name(); +is($distro,'centos'); +my $version = $linux->distribution_version(); +is ($version,'7.0.1406'); diff --git a/t/centos7/centos-release b/t/centos7/centos-release new file mode 100644 index 0000000..4319cd9 --- /dev/null +++ b/t/centos7/centos-release @@ -0,0 +1 @@ +CentOS Linux release 7.0.1406 (Core) diff --git a/t/centos7/files b/t/centos7/files new file mode 100644 index 0000000..63f81e3 --- /dev/null +++ b/t/centos7/files @@ -0,0 +1,5 @@ +exists: +centos-release +do not: +redhat_version +lsb-release -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/liblinux-distribution-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits