module-apt/templates/Debian/preferences_lenny.erb
Micah Anderson 07a031f205 fix for $lsbdistcodename regression introduced by ac166366d7
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
2012-12-05 13:46:23 -05:00

25 lines
620 B
Text

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
Explanation: Debian backports
Package: *
Pin: origin backports.debian.org
Pin-Priority: 200
Explanation: Debian <%= next_release=scope.lookupvar('apt::next_release') %>
Package: *
Pin: release o=Debian,a=<%= next_release %>
Pin-Priority: 2
Explanation: Debian sid
Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 1
Explanation: Debian fallback
Package: *
Pin: release o=Debian
Pin-Priority: -10