Skip to content

(PUP-897) Allow rpm package provider to query by virtual package name.#2370

Merged
kylog merged 1 commit intopuppetlabs:masterfrom
peterhuene:master
Feb 19, 2014
Merged

(PUP-897) Allow rpm package provider to query by virtual package name.#2370
kylog merged 1 commit intopuppetlabs:masterfrom
peterhuene:master

Conversation

@peterhuene
Copy link
Contributor

Some providers that inherit from the rpm provider, such as the yum provider, do
a query after installing a package. If the package is specified by a virtual name,
the yum provider installs the package successfully, but the base rpm provider
implementation fails to query the installed package. This causes a confusing
"could not find package" error even though the package was installed.

Passing the '--whatprovides' option to rpm when performing a query instructs rpm
to locate packages that provide the given virtual name. This enables child providers
to install by virtual package name without errors.

Some providers that inherit from the rpm provider, such as the yum provider, do
a query after installing a package. If the package is specified by a virtual name,
the yum provider installs the package successfully, but the base rpm provider
implementation fails to query the installed package. This causes a confusing
"could not find package" error even though the package was installed.

Passing the '--whatprovides' option to rpm when performing a query instructs rpm
to locate packages that provide the given virtual name. This enables child providers
to install by virtual package name without errors.
@puppetcla
Copy link

CLA signed by all contributors.

kylog pushed a commit that referenced this pull request Feb 19, 2014
(PUP-897) Allow rpm package provider to query by virtual package name.
@kylog kylog merged commit ecb761e into puppetlabs:master Feb 19, 2014
@skottler
Copy link

Was this intended to supersede #2364?

@peterhuene
Copy link
Contributor Author

@skottler Yes, it appears so; I didn't see your PR and we had a long-standing ticket on the issue. While testing --whatprovides, I noticed that if is no package installed that provides the given virtual package, rpm returns an exit code of 1 with a "no package provides foo". Is there a reason you run rpm twice when handling the ExecutionFailure? Additionally, do you foresee any problems with always passing --whatprovides like this commit does instead of taking your approach? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants