HomePhorge

(PUP-1270) Use full IPS package version matching
a6e833a03e43Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-1270) Use full IPS package version matching

Originally, the pkg provider would only consider IPS versions partially,
eg. '1.0-0.151006', due to not calling pkg(1) with -v. This version
string is missing the "build version" and "timestamp" (documented in
pkg(5)). This causes several issues:

  • ensure => latest does nothing when the updated package only has a changed timestamp
  • ensure => '1.0,5.11-0.151006:20140220T084443Z' is always applied, because it's not string equal to what puppet thinks is the installed

version ('1.0-0.151006'); this causes pkg(1) to exit with status 4,
which makes puppet throw an error

  • ensure => '1.0-0.151006' sort of works; on the first run, it installs the latest available matching version (due to pkg(1) working that way), and on subsequent runs does nothing. This can lead to subtle bugs where systems provisioned later do not necessarily have the same version of a package installed (ie. if a newer-timestamped one was released in the meantime).

This commit implements a provider-specific insync? for the pkg type.
Unfortunately it's not possible to fix this issue without allowing
less-than-explicit version numbers in ensure (because that's the
original behavior) without breaking backward compatibility. We try to
match the default behavior of pkg(1) when encountering
less-than-explicit versions in ensure, and throw warnings for such
implicit version matches.

Details

Provenance
Lauri Tirkkonen <lotheac@iki.fi>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb18ddc3eb6b1: (PUP-1270) downgrade IPS packages in-place instead of uninstall-reinstall
Branches
Unknown
Tags
Unknown

Event Timeline

Lauri Tirkkonen <lotheac@iki.fi> committed rPUa6e833a03e43: (PUP-1270) Use full IPS package version matching (authored by Lauri Tirkkonen <lotheac@iki.fi>).Nov 13 2014, 12:54 PM