Puppet: System Administration Automated

Support

Ticket #838 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

dpkg provider: update functionality

Reported by: DavidS Assigned to: community
Priority: normal Milestone:
Component: library Version: 0.23.1
Severity: normal Keywords: dpkg,provider,ensure,latest
Cc: Triage Stage: Unreviewed
Attached Patches: Code Complexity: Unknown

Description

When trying to update a .deb package by using the dpkg provider, puppet 0.23.[12] (only versions tested) says:

err: //ic/dbp/Package[puppet]/ensure: change from 0.23.1-1 to puppet    0.23.2-7
 failed: Could not update: undefined method `update' for #<Puppet::Type::Package::ProviderDpkg:0xb6b35e3c> at /etc/puppet/modules/dbp/manifests/init.pp:118

Adding the trivial version of update -- like the apt provider has one -- enabled the dpkg provider to update the package in question:

notice: //ic/dbp/Package[puppet]/ensure: ensure changed '0.23.1-1' to 'puppet   0.23.2-7
'

Notice the new ensure value. This is caused by the latest method of the dpkg provider, which doesn't parse the output.

The attached patch against current HEAD adds the update method and parses the output from dpkg-deb to check the packagename and return the version in latest

Attachments

dpkg-update.patch (0.7 kB) - added by DavidS on 09/26/07 21:29:46.

Change History

09/26/07 21:29:46 changed by DavidS

  • attachment dpkg-update.patch added.

10/04/07 22:32:38 changed by michael

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [8ba3a701fdcd11509acc032b0524e2e8c9e6857a].