From 07a031f2050deecfefa205e1e0c63586692a06ff Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 5 Dec 2012 13:46:23 -0500 Subject: 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:
+### 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') %>
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 --- templates/Debian/preferences_wheezy.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/Debian/preferences_wheezy.erb') 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 -- cgit v1.2.3