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/sources.list.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/Debian/sources.list.erb') 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') %> -- cgit v1.2.3