Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1537

Dpkg package provider misbehaving for held package with specific version

    XMLWordPrintable

Details

    • PUP Bug Template
    • 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
    • Hide
      Added mark property for package providers on
      Debian(dpkg/apt/fink/aptitude) and Solaris(pgk) as
      alternative of using "held" value for ensure.

      Using "held" value for ensuring works as before, but it shows
      deprecation warning and will be removed in a further release.

      Allowed values for mark are "hold/none", default to "none".
      Mark can be specified with or without ensure, if ensure is
      missing it will default to "present".

      Mark cannot be specified together with "purged", "absent" or "held"
      values for ensure.
      Show
      Added mark property for package providers on Debian(dpkg/apt/fink/aptitude) and Solaris(pgk) as alternative of using "held" value for ensure. Using "held" value for ensuring works as before, but it shows deprecation warning and will be removed in a further release. Allowed values for mark are "hold/none", default to "none". Mark can be specified with or without ensure, if ensure is missing it will default to "present". Mark cannot be specified together with "purged", "absent" or "held" values for ensure.

    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

      Attachments

        Issue Links

          Activity

            People

              ciprian.badescu Ciprian Badescu
              redmine.exporter redmine.exporter
              Eric Thompson Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support