summaryrefslogtreecommitdiff
path: root/templates/Debian
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-12-05 13:46:23 -0500
committerMicah Anderson <micah@riseup.net>2012-12-05 13:46:23 -0500
commit07a031f2050deecfefa205e1e0c63586692a06ff (patch)
tree280c615d47a615063c0ea613dd042358e56b7314 /templates/Debian
parent460c1d54d1d04c1dd648d60a0b10f473d801f9b8 (diff)
fix for $lsbdistcodename regression introduced by ac166366d7baa45b74e09974289d9fb2dad38e67
What happened here was the $codename = $::lsbdistcodename was removed from init.pp and replaced with just $::lsbdistcodename whereever $codename was used. Then in the sources.list.erb and preferences files things were changed like this: <pre>+### Debian current: <%= codename = scope.lookupvar('::lsbdistcodename') %> ... -deb <%= debian_url %> <%= codename %> <%= repos %> ... +deb <%= debian_url=scope.lookupvar('apt::debian_url') %> <%= codename %> <%= repos=scope.lookupvar('apt::repos') %> </pre> This meant that the codename was always set to lsbdistcodename, and you because in newer puppet versions you cannot assign a value to a top-level facter variable, it is not possible to change this. Because we cannot change $lsbdistcodename, we have to fix this by allowing the user to pass a different, non-top-level scoped variable to the class as a parameter, which defaults to $::lsbdistcodename, so that upgrades can be triggered. This is documented in the README in an upgrade notice
Diffstat (limited to 'templates/Debian')
-rw-r--r--templates/Debian/preferences_lenny.erb6
-rw-r--r--templates/Debian/preferences_squeeze.erb12
-rw-r--r--templates/Debian/preferences_wheezy.erb8
-rw-r--r--templates/Debian/sources.list.erb2
4 files changed, 14 insertions, 14 deletions
diff --git a/templates/Debian/preferences_lenny.erb b/templates/Debian/preferences_lenny.erb
index 4648ce1..5c3c829 100644
--- a/templates/Debian/preferences_lenny.erb
+++ b/templates/Debian/preferences_lenny.erb
@@ -1,4 +1,4 @@
-Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>
+Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
Package: *
Pin: release o=Debian,a=<%= scope.lookupvar('apt::release') %>,v=<%= scope.lookupvar('apt::release_version') %>*
Pin-Priority: 990
@@ -8,9 +8,9 @@ Package: *
Pin: origin backports.debian.org
Pin-Priority: 200
-Explanation: Debian <%= scope.lookupvar('apt::next_release') %>
+Explanation: Debian <%= next_release=scope.lookupvar('apt::next_release') %>
Package: *
-Pin: release o=Debian,a=<%= scope.lookupvar('apt::next_release') %>
+Pin: release o=Debian,a=<%= next_release %>
Pin-Priority: 2
Explanation: Debian sid
diff --git a/templates/Debian/preferences_squeeze.erb b/templates/Debian/preferences_squeeze.erb
index e74515e..efe7720 100644
--- a/templates/Debian/preferences_squeeze.erb
+++ b/templates/Debian/preferences_squeeze.erb
@@ -1,16 +1,16 @@
-Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>
+Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
Package: *
-Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>
+Pin: release o=Debian,n=<%= codename %>
Pin-Priority: 990
-Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>-updates
+Explanation: Debian <%= codename %>-updates
Package: *
-Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>-updates
+Pin: release o=Debian,n=<%= codename %>-updates
Pin-Priority: 990
-Explanation: Debian <%= scope.lookupvar('apt::next_codename') %>
+Explanation: Debian <%= next_codename=scope.lookupvar('apt::next_codename') %>
Package: *
-Pin: release o=Debian,n=<%= scope.lookupvar('apt::next_codename') %>
+Pin: release o=Debian,n=<%= next_codename %>
Pin-Priority: 2
Explanation: Debian sid
diff --git a/templates/Debian/preferences_wheezy.erb b/templates/Debian/preferences_wheezy.erb
index e8c15d6..0cc0e5c 100644
--- a/templates/Debian/preferences_wheezy.erb
+++ b/templates/Debian/preferences_wheezy.erb
@@ -1,11 +1,11 @@
-Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>
+Explanation: Debian <%= codename=scope.lookupvar('apt::codename') %>
Package: *
-Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>
+Pin: release o=Debian,n=<%= codename %>
Pin-Priority: 990
-Explanation: Debian <%= scope.lookupvar('::lsbdistcodename') %>-updates
+Explanation: Debian <%= codename %>-updates
Package: *
-Pin: release o=Debian,n=<%= scope.lookupvar('::lsbdistcodename') %>-updates
+Pin: release o=Debian,n=<%= codename %>-updates
Pin-Priority: 990
Explanation: Debian sid
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index ddfcaab..04c13ea 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -1,7 +1,7 @@
# This file is managed by puppet
# all local modifications will be overwritten
-### Debian current: <%= codename = scope.lookupvar('::lsbdistcodename') %>
+### Debian current: <%= codename=scope.lookupvar('apt::codename') %>
# basic
deb <%= debian_url=scope.lookupvar('apt::debian_url') %> <%= codename %> <%= lrepos=scope.lookupvar('apt::real_repos') %>