Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Night's Watch
-
5
-
NW - 2019-10-16, NW - 2019-10-30, NW - 2019-11-13, 2019-11-27, 2019-12-11, 2019-12-24, NW - 2020-01-22, NW - 2020-02-05, NW - 2020-02-19
-
New Feature
-
Description
Judging from this StackOverflow question [1], I am running into a long-standing problem with the dpkg package provder. I have packages pinned to specific versions in Puppet with
ensure => 'version_string'
and at the same time have put these packages on 'hold' with dpkg to prevent unintended manual upgrades. Now, on every Puppet run, I get this:
Package[mypackage]/ensure: ensure changed 'held' to 'version_string'
I assume this is because of the following code in provider/package/dpkg.rb, line 92 (in Puppet 3.3.2-1puppetlabs1):
hash[:ensure] = :held if hash[:desired] == 'hold'
which sets the current 'ensure' to 'held', where the desired 'ensure' is the package version. It seems to me that the 'ensure' parameter should not be (ab)used to implement the 'holdable' feature.
[1] http://serverfault.com/questions/370266/puppet-using-ensure-with-package-version-and-held