diff options
author | intrigeri <intrigeri@boum.org> | 2010-10-06 12:30:50 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-10-06 12:30:50 +0200 |
commit | ff73987f30e6566b9a89208e6b1ad96724571e0c (patch) | |
tree | 248b6800cbed4c62b17e078e346f50d86a36130b | |
parent | 81fe80d914a2036503cd38fd5d37ad73e558ebd2 (diff) | |
download | puppet-apt-ff73987f30e6566b9a89208e6b1ad96724571e0c.tar.gz puppet-apt-ff73987f30e6566b9a89208e6b1ad96724571e0c.tar.bz2 |
Add per-release preferences files.
The previous default pinning preferences only supported tracking stable.
Tracking squeeze or sid is now possible.
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | manifests/default_preferences.pp | 2 | ||||
-rw-r--r-- | templates/preferences.erb | 7 | ||||
-rw-r--r-- | templates/preferences_lenny.erb | 19 | ||||
-rw-r--r-- | templates/preferences_sid.erb | 9 | ||||
-rw-r--r-- | templates/preferences_squeeze.erb | 19 |
6 files changed, 52 insertions, 11 deletions
@@ -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 diff --git a/manifests/default_preferences.pp b/manifests/default_preferences.pp index 3cdb355..521d2f2 100644 --- a/manifests/default_preferences.pp +++ b/manifests/default_preferences.pp @@ -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 index ac71582..0000000 --- a/templates/preferences.erb +++ /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 index 0000000..0d7b46f --- /dev/null +++ b/templates/preferences_lenny.erb @@ -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 index 0000000..3d8a45f --- /dev/null +++ b/templates/preferences_sid.erb @@ -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 index 0000000..9aef25a --- /dev/null +++ b/templates/preferences_squeeze.erb @@ -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 |