[PUP-1927] Yum Package Provider Ignores Source Parameter Created: 2014/03/13  Updated: 2018/05/21

Status: Accepted
Project: Puppet
Component/s: Types and Providers
Affects Version/s: PUP 3.4.3
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Christopher Barbour Assignee: Unassigned
Resolution: Unresolved Votes: 5
Labels: el, fileserver, package, rpm, source, type_and_provider, yum
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
Template:
Team: Platform OS
QA Contact: Narmadha Perumal

 Description   

The YUM provider for the package type ignores the source parameter, and instead uses the name parameter for all package installation tasks. This behavior is somewhat inconsistent with other providers for this resource type.

For example, with the RPM provider, the name parameter is compared against the packages instances list. If the defined package is not installed but should be, the provider will then download the package supplied by the source parameter and install it.

With the yum provider, in the same conditions, puppet will kick off a yum installation of the named package, not the package supplied by the source parameter. This is okay if the desired package happens to be in a configured yum repository, but not so great otherwise.

YUM fully supports installation from a source path; on older releases using the localinstall command, and on newer systems using the install command.

This behavior is useful for multi-platform support and for module testing. In testing, I may wish to pass a explicit source for a package, without overriding the native provider on RHEL and derivative systems. It's also useful since YUM will still manage dependencies, even when supplied with a source URL.

This also ensures that the documented behavior of the YUM provider matches the actual behavior.



 Comments   
Comment by Marco Rodrigues [ 2016/06/27 ]

We are in the version 4 of Puppet and this is still not supported.

   package { "puppet-agent":
        provider => 'yum',
        ensure   => 'latest',
        source   => "puppet:///modules/${module_name}/puppet-agent-1.5.2-1.el7.x86_64.rpm"
    }

Generated at Tue Jan 28 07:48:51 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.