]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Add per-release preferences files.
authorintrigeri <intrigeri@boum.org>
Wed, 6 Oct 2010 10:30:50 +0000 (12:30 +0200)
committerintrigeri <intrigeri@boum.org>
Wed, 6 Oct 2010 10:30:50 +0000 (12:30 +0200)
The previous default pinning preferences only supported tracking stable.
Tracking squeeze or sid is now possible.

README
manifests/default_preferences.pp
templates/preferences.erb [deleted file]
templates/preferences_lenny.erb [new file with mode: 0644]
templates/preferences_sid.erb [new file with mode: 0644]
templates/preferences_squeeze.erb [new file with mode: 0644]

diff --git a/README b/README
index b1f98c61b7d3d45eb7276096e45a14591049adc3..f39007b510f59a901c7539471034f084e338da8f 100644 (file)
--- a/README
+++ b/README
@@ -11,8 +11,9 @@ backports.debian.org is added.
 
 dselect is switched to expert mode to suppress superfluous help screens.
 
-sources.list and apt_preferences are managed. Testing and unstable are pinned to
-very low values by default to prevent accidental upgrades.
+sources.list and apt_preferences are managed. More recent Debian
+releases are pinned to very low values by default to prevent
+accidental upgrades.
 
 This module needs lsb-release installed.
 
@@ -54,7 +55,7 @@ $custom_sources_list ='template("apt/sources.list")'
 $custom_preferences    
 --------------------
 By default this module will use a basic apt/preferences file with
-unstable and testing pinned to very low values so that any package
+more recent releases pinned to very low values so that any package
 installation will not accidentally pull in packages from those suites
 unless you explicitly specify the version number. You can set this
 variable to pull in a customized apt/preferences template, for
index 3cdb355221f77ff7e6f80811c183f4d745efc86a..521d2f234de15e9aeee7fc37241114651d447de0 100644 (file)
@@ -2,7 +2,7 @@ class apt::default_preferences {
   config_file {
     # this just pins unstable and testing to very low values
     "/etc/apt/preferences":
-      content => template("apt/preferences.erb"),
+      content => template("apt/preferences_${codename}.erb"),
       # use File[apt_config] to reference a completed configuration
       # See "The Puppet Semaphor" 2007-06-25 on the puppet-users ML
       alias => apt_config,
diff --git a/templates/preferences.erb b/templates/preferences.erb
deleted file mode 100644 (file)
index ac71582..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Package: *
-Pin: release a=unstable
-Pin-Priority: 1
-
-Package: *
-Pin: release a=testing
-Pin-Priority: 2
diff --git a/templates/preferences_lenny.erb b/templates/preferences_lenny.erb
new file mode 100644 (file)
index 0000000..0d7b46f
--- /dev/null
@@ -0,0 +1,19 @@
+Explanation: Debian <%= codename %>
+Package: *
+Pin: release o=Debian,n=<%= codename %>
+Pin-Priority: 990
+
+Explanation: Debian <%= next_codename %>
+Package: *
+Pin: release o=Debian,n=<%= next_codename %>
+Pin-Priority: 2
+
+Explanation: Debian sid
+Package: *
+Pin: release o=Debian,n=sid
+Pin-Priority: 1
+
+Explanation: Debian fallback
+Package: *
+Pin: release o=Debian
+Pin-Priority: -10
diff --git a/templates/preferences_sid.erb b/templates/preferences_sid.erb
new file mode 100644 (file)
index 0000000..3d8a45f
--- /dev/null
@@ -0,0 +1,9 @@
+Explanation: Debian sid
+Package: *
+Pin: release o=Debian,n=sid
+Pin-Priority: 990
+
+Explanation: Debian fallback
+Package: *
+Pin: release o=Debian
+Pin-Priority: -10
diff --git a/templates/preferences_squeeze.erb b/templates/preferences_squeeze.erb
new file mode 100644 (file)
index 0000000..9aef25a
--- /dev/null
@@ -0,0 +1,19 @@
+Explanation: Debian <%= codename %>
+Package: *
+Pin: release o=Debian,n=<%= codename %>
+Pin-Priority: 990
+
+Explanation: Debian wheezy
+Package: *
+Pin: release o=Debian,n=wheezy
+Pin-Priority: 2
+
+Explanation: Debian sid
+Package: *
+Pin: release o=Debian,n=sid
+Pin-Priority: 1
+
+Explanation: Debian fallback
+Package: *
+Pin: release o=Debian
+Pin-Priority: -10