Merge pull request #604 from tdb/fix_version_check

Fix version check on 16.04.
This commit is contained in:
TP Honey 2016-04-28 11:40:52 +01:00
commit 24eb003630

View file

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