The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #18926

Package names not qualified by provider

Added by Ken Coar over 3 years ago. Updated over 3 years ago.

Status:DuplicateStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:package
Target version:-
Affected Puppet version:2.7.18 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

[Puppet 2.7 on RHEL6 and Fedora]

The names of packages from different providers should be namespaced/qualified by the provider, or else erroneous conflicts may result.

These two resources conflict:

package {
  'foo':
    provider => yum,
}
package {
  'foo':
    provider => gem,
}
Duplicate declaration: Package[foo] is already declared; cannot redeclare

(The names are fake, obviously, to avoid clouding the issue with ‘use this other name instead’)

I tried working around it by using a different name for the resources, but no joy — the name attribute is the namevar:

package {
  'foo':
    name     => 'rpm-foo',
    provider => yum,
}
package {
  'foo':
    name     => 'gem-foo',
    provider => gem,
}
Duplicate declaration: Package[foo] is already declared; cannot redeclare

Someone in IRC suggested including the architecture in the RPM declaration, like

"foo.${::architecture}":

but that is at best a hack, and breaks anyway if the package isn’t architecture specific (i.e., .noarch).


Related issues

Duplicates Puppet - Bug #1398: Common package name in two different providers Accepted 07/07/2008

History

#1 Updated by Dominic Cleal over 3 years ago

  • Status changed from Unreviewed to Duplicate

Dupe of #1398.

Also available in: Atom PDF