+ if $::apt::xfacts['lsbdistid'] == 'Debian' {
+ 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 {
+ $distid = downcase($::apt::xfacts['lsbdistid'])
+ $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2-${release}")
+ } else {
+ $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-\\2-${release}")