allow possibility of disabling backports

This commit is contained in:
Antoine Beaupré 2015-06-09 11:25:34 -04:00
parent 87bfb868d7
commit 5ea69cb039
3 changed files with 8 additions and 4 deletions

View file

@ -7,6 +7,7 @@ class apt(
$codename = $apt::params::codename, $codename = $apt::params::codename,
$use_lts = $apt::params::use_lts, $use_lts = $apt::params::use_lts,
$use_volatile = $apt::params::use_volatile, $use_volatile = $apt::params::use_volatile,
$use_backports = $apt::params::use_backports,
$include_src = $apt::params::include_src, $include_src = $apt::params::include_src,
$use_next_release = $apt::params::use_next_release, $use_next_release = $apt::params::use_next_release,
$debian_url = $apt::params::debian_url, $debian_url = $apt::params::debian_url,

View file

@ -2,6 +2,7 @@ class apt::params () {
$codename = $::lsbdistcodename $codename = $::lsbdistcodename
$use_lts = false $use_lts = false
$use_volatile = false $use_volatile = false
$use_backports = true
$include_src = false $include_src = false
$use_next_release = false $use_next_release = false
$debian_url = 'http://httpredir.debian.org/debian/' $debian_url = 'http://httpredir.debian.org/debian/'

View file

@ -19,14 +19,16 @@ deb-src <%= security_url %> <%= codename %>/updates <%= lrepos %>
# There is no security support for <%= release %> # There is no security support for <%= release %>
<% end -%> <% end -%>
<% if use_volatile=scope.lookupvar('apt::use_backports') -%>
# backports # backports
<% if (release == "testing" || release == "unstable" || release == "experimental") -%> <% if (release == "testing" || release == "unstable" || release == "experimental") -%>
# There is no backports archive for <%= release %> # There is no backports archive for <%= release %>
<% else -%> <% else -%>
deb <%= backports_url=scope.lookupvar('apt::backports_url') %> <%= codename %>-backports <%= lrepos %> deb <%= backports_url=scope.lookupvar('apt::backports_url') %> <%= codename %>-backports <%= lrepos %>
<% if include_src -%> <% if include_src -%>
deb-src <%= backports_url %> <%= codename %>-backports <%= lrepos %> deb-src <%= backports_url %> <%= codename %>-backports <%= lrepos %>
<% end <% end
end
end -%> end -%>
<% if use_volatile=scope.lookupvar('apt::use_volatile') -%> <% if use_volatile=scope.lookupvar('apt::use_volatile') -%>