Issue #1398 has been updated by Pedro CĂ´rte-Real.
Just hit this exact issue and was impressed it's a 5 year old bug. It's been filed as a feature but it really is a bug. There should be a straightforward way to express in puppet that "package <pkg> should be absent in <providerA> and installed in <providerB>". Renaming packages isn't an option given that in a lot of cases these are in fact the same package, where debian/redhat has packaged in through their tools and ruby/python through theirs. Even if they're not the same packages expecting that all the Package providers have non-clashing namespaces is just asking for trouble. It would probably make sense for Package to have a $pkgname property that defaults to $name to get around this. ---------------------------------------- Feature #1398: Common package name in two different providers https://projects.puppetlabs.com/issues/1398#change-91088 * Author: Lawrence Ludwig * Status: Accepted * Priority: Normal * Assignee: * Category: package * Target version: * Affected Puppet version: 0.24.4 * 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
