Issue #1398 has been updated by Adrien Thebo.

My understanding of this issue is that there is no tidy solution to this issue. 
While it may make sense to have multiple packages with the same name but 
different providers, it breaks down when applied to other types. For instance, 
you can't have two groups with the same name but different providers (or if you 
do, it'll get ugly). Alternately, what happens when you have a manifest like 
this?

<pre>
package { 'htop':
  ensure => present,
  provider => apt,
}

package { 'htop':
  ensure => absent,
  provider => dpkg,
}
</pre>

In this case, is it acceptable to let those two resources constantly break each 
other?

In addition, how do you refer to resources by reference with the same name but 
different providers?

<pre>
package { 'redis':
  ensure => present,
  provider => yum,
}
# => Package['redis:yum']      It's reasonable for packages to have a `:` in 
the title, depending on the provider
# => Package[['redis', 'yum']] This would require overhauling the API and would 
be probably VERY backwards incompatible
</pre>


I've personally run into this problem and it is a real problem, but the reason 
this has been open for 5 years is because it's not a 5 line patch. To fix this 
we need to hammer out a solution that addresses the issue of specifying the 
name and provider in resource references and determining what types and 
providers can support duplicates, and what types and providers can't.

----------------------------------------
Feature #1398: Common package name in two different providers
https://projects.puppetlabs.com/issues/1398#change-97457

* Author: Lawrence Ludwig
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: package
* Target version: 
* Affected Puppet version: 2.7.21
* Keywords: package alias
* Branch: 
----------------------------------------
I have a common package name, that's in two different package managers
(one with yum the other with gem)

        package { "remove-mysql":
                name     => "mysql",
                provider => "yum",
                ensure   => absent,
        }

---------------------------------------------------------

        package { "gem-mysql":
                name    => "mysql",
                ensure   => "2.7",
                provider => gem,
        }
---------------------------------------------------------

I get this error.

Jul  3 08:43:34 puppetd[11872]: Could not retrieve catalog:
Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot
alias Package[gem-mysql] to mysql; resource Package[mysql] already
exists at /etc/puppet/modules/ruby-mysql/manifests/init.pp:11 on node 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to