Add «main» to Ubuntu backports repos.
[puppet-modules/puppetlabs-apt.git] / manifests / backports.pp
index 6734e05297629cfad9d91b4643b45d629c5da47a..aafdf96578dfa35cc599cc0af821fd6ea67d2f30 100644 (file)
 #
 # Copyright 2011 Puppet Labs Inc, unless otherwise noted.
 class apt::backports(
-  $release  = $lsbdistcodename,
-  $location = $apt::params::backports_locations
+  $release  = $::lsbdistcodename,
+  $location = $apt::params::backports_location
 ) inherits apt::params {
 
-  apt::source { 'backports.list':
+  $release_real = downcase($release)
+
+  apt::source { 'backports':
     location   => $location,
-    release    => "${release}-backports",
-    repos      => $lsbdistid ? {
+    release    => "${release_real}-backports",
+    repos      => $::lsbdistid ? {
       'debian' => 'main contrib non-free',
-      'ubuntu' => 'universe multiverse restricted',
+      'ubuntu' => 'main universe multiverse restricted',
     },
-    key        => $lsbdistid ? {
+    key        => $::lsbdistid ? {
       'debian' => '55BE302B',
       'ubuntu' => '437D05B5',
     },
     key_server => 'pgp.mit.edu',
     pin        => '200',
-    notify => Exec["apt-get update"],
   }
 }
-