move backports in a seperate class, add the Cache-Limit hack to all configs, try to depend on lsb-release properly

This commit is contained in:
Antoine Beaupre 2008-07-03 18:05:58 -04:00
parent 45e01f3eb9
commit 3ecbee6a27

View file

@ -14,7 +14,7 @@ class apt {
default => $apt_clean, default => $apt_clean,
} }
package { apt: ensure => installed } package { [ 'lsb-release', 'apt' ]: ensure => installed }
# a few templates need lsbdistcodename # a few templates need lsbdistcodename
include assert_lsbdistcodename include assert_lsbdistcodename
@ -25,8 +25,8 @@ class apt {
} }
default: { default: {
config_file { "/etc/apt/sources.list": config_file { "/etc/apt/sources.list":
content => $custom_sources_list content => $custom_sources_list,
require => Exec[assert_lsbdistcodename]; require => Exec[assert_lsbdistcodename],
} }
} }
} }
@ -52,7 +52,7 @@ class apt {
require => File["/etc/apt/sources.list"]; require => File["/etc/apt/sources.list"];
# little default settings which keep the system sane # little default settings which keep the system sane
"/etc/apt/apt.conf.d/from_puppet": "/etc/apt/apt.conf.d/from_puppet":
content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\n", content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\nAPT::Cache-Limit 22582912;\n",
before => File[apt_config]; before => File[apt_config];
} }
@ -63,7 +63,7 @@ class apt {
exec { exec {
# "&& sleep 1" is workaround for older(?) clients # "&& sleep 1" is workaround for older(?) clients
"/usr/bin/apt-get update && sleep 1 #on refresh": "/usr/bin/apt-get update #on refresh":
refreshonly => true, refreshonly => true,
subscribe => [ File["/etc/apt/sources.list"], subscribe => [ File["/etc/apt/sources.list"],
File["/etc/apt/preferences"], File["/etc/apt/apt.conf.d"], File["/etc/apt/preferences"], File["/etc/apt/apt.conf.d"],
@ -78,10 +78,16 @@ class apt {
case $lsbdistcodename { case $lsbdistcodename {
etch: { etch: {
## This package should really always be current ## This package should really always be current
package { package { "debian-archive-keyring": ensure => latest, }
[ "debian-archive-keyring", "debian-backports-keyring" ]: }
ensure => latest, }
} }
class apt::backports inherits apt {
$custom_sources_list = template("apt/sources.list+backports.erb")
case $lsbdistcodename {
etch: {
package { "debian-backports-keyring": ensure => latest, }
# This key was downloaded from # This key was downloaded from
# http://backports.org/debian/archive.key # http://backports.org/debian/archive.key