Add support for Squeeze LTS.

This commit is contained in:
intrigeri 2015-02-07 16:12:55 +00:00
parent 5a8d214529
commit 85c7554c4b
5 changed files with 29 additions and 0 deletions

8
README
View file

@ -128,6 +128,14 @@ Example usage:
Class parameters:
* use_lts
If this variable is set to true the CODENAME-lts sources (such as
squeeze-lts) are added.
By default this is false for backward compatibility with older
versions of this module.
* use_volatile
If this variable is set to true the CODENAME-updates sources (such as

View file

@ -5,12 +5,14 @@
class apt(
$codename = $apt::params::codename,
$use_lts = $apt::params::use_lts,
$use_volatile = $apt::params::use_volatile,
$include_src = $apt::params::include_src,
$use_next_release = $apt::params::use_next_release,
$debian_url = $apt::params::debian_url,
$security_url = $apt::params::security_url,
$backports_url = $apt::params::backports_url,
$lts_url = $apt::params::lts_url,
$volatile_url = $apt::params::volatile_url,
$ubuntu_url = $apt::params::ubuntu_url,
$repos = $apt::params::repos,

View file

@ -1,5 +1,6 @@
class apt::params () {
$codename = $::lsbdistcodename
$use_lts = false
$use_volatile = false
$include_src = false
$use_next_release = false
@ -9,6 +10,7 @@ class apt::params () {
'wheezy' => $debian_url,
default => 'http://backports.debian.org/debian-backports/',
}
$lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
$ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$repos = 'auto'

View file

@ -8,6 +8,11 @@ Package: *
Pin: release o=Debian,n=<%= codename %>-updates
Pin-Priority: 990
Explanation: Debian <%= codename %>-lts
Package: *
Pin: release o=Debian,n=<%= codename %>-lts
Pin-Priority: 990
Explanation: Debian <%= next_codename=scope.lookupvar('apt::next_codename') %>
Package: *
Pin: release o=Debian,n=<%= next_codename %>

View file

@ -41,6 +41,18 @@ deb-src <%= debian_url %> <%= codename %>-updates <%= lrepos %>
<% end -%>
<% end -%>
<% if use_lts=scope.lookupvar('apt::use_lts') -%>
# LTS
<% if release != "oldstable" -%>
# There is no LTS archive for <%= release %>
<% else -%>
deb <%= debian_url %> <%= codename %>-lts <%= lrepos %>
<% if include_src -%>
deb-src <%= debian_url %> <%= codename %>-lts <%= lrepos %>
<% end -%>
<% end -%>
<% end -%>
<% if next_release=scope.lookupvar('apt::use_next_release') -%>
### Debian next: <%= next_release=scope.lookupvar('apt::next_release') ; next_codename=scope.lookupvar('apt::next_codename') %>