From: TP Honey Date: Thu, 28 Apr 2016 10:40:52 +0000 (+0100) Subject: Merge pull request #604 from tdb/fix_version_check X-Git-Tag: 2.3.0~17 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=24eb0036304c538f560cf0187acdaf26029b1db4;hp=e9925384e23d89170a521fcc2cc91e009a361e0c;p=puppet-modules%2Fpuppetlabs-apt.git Merge pull request #604 from tdb/fix_version_check Fix version check on 16.04. --- diff --git a/manifests/ppa.pp b/manifests/ppa.pp index 7069e2e..dfa3d08 100644 --- a/manifests/ppa.pp +++ b/manifests/ppa.pp @@ -14,10 +14,7 @@ define apt::ppa( fail('apt::ppa is not currently supported on Debian.') } - $ubuntu_release_year = regsubst($::apt::xfacts['lsbdistrelease'], '\.\d+$', '', 'G') + 0 - $ubuntu_release_month = regsubst($::apt::xfacts['lsbdistrelease'], '^\d+\.', '', 'G') + 0 - - if $ubuntu_release_year >= 15 and $ubuntu_release_month >= 10 { + if versioncmp($::apt::xfacts['lsbdistrelease'], '15.10') >= 0 { $distid = downcase($::apt::xfacts['lsbdistid']) $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2-${release}") } else {