how to handle this package issue?

270 views
Skip to first unread message

Larry Ludwig

unread,
Jul 3, 2008, 8:44:07 AM7/3/08
to Puppet Users
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


What's the work around?

Larry Ludwig

unread,
Jul 3, 2008, 8:50:52 AM7/3/08
to Puppet Users
I assume puppet puts all the different package types in the same
namespace. Which is bad, this will prevent issues like the one
listed.

-L
--
Larry Ludwig
Empowering Media
1-866-792-0489 x600
Managed and Unmanaged Xen VPSes
http://www.hostcube.com/

Evan Hisey

unread,
Jul 3, 2008, 9:21:24 AM7/3/08
to puppet...@googlegroups.com
Have you tried to force an alias with the alias metatype?

Evan

Evan Hisey

unread,
Jul 3, 2008, 9:23:04 AM7/3/08
to puppet...@googlegroups.com
On Thu, Jul 3, 2008 at 8:21 AM, Evan Hisey <ehi...@gmail.com> wrote:
> On Thu, Jul 3, 2008 at 7:50 AM, Larry Ludwig <larr...@gmail.com> wrote:
>>
>> I assume puppet puts all the different package types in the same
>> namespace. Which is bad, this will prevent issues like the one
>> listed.
>>

You might also see what setting the title=> will do for the problem also.

Larry Ludwig

unread,
Jul 3, 2008, 11:25:27 AM7/3/08
to Puppet Users
alias metatype? explain?

On Jul 3, 9:21 am, "Evan Hisey" <ehi...@gmail.com> wrote:

Larry Ludwig

unread,
Jul 3, 2008, 11:30:25 AM7/3/08
to Puppet Users
alias=> didn't work same result.

Larry Ludwig

unread,
Jul 3, 2008, 11:32:01 AM7/3/08
to Puppet Users
Unless there is a work around, this appears to be a bug to me. Luke
and other puppet-masters any ideas?

Luke Kanies

unread,
Jul 3, 2008, 6:00:10 PM7/3/08
to puppet...@googlegroups.com
On Jul 3, 2008, at 10:32 AM, Larry Ludwig wrote:

> Unless there is a work around, this appears to be a bug to me. Luke
> and other puppet-masters any ideas?


This is a bug, and it's one I've been wanting to fix for a long time.

I've done most of the groundwork for fixing it in the master branch,
but it's pretty far behind other stuff in the priority list.

ATM, your only real option is to use exec to remove the package you
don't want.

--
There are three social classes in America: upper middle class, middle
class, and lower middle class. --Judith Martin
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Larry Ludwig

unread,
Jul 4, 2008, 12:50:10 PM7/4/08
to Puppet Users


On Jul 3, 6:00 pm, Luke Kanies <l...@madstop.com> wrote:
> On Jul 3, 2008, at 10:32 AM, Larry Ludwig wrote:
>

>
> This is a bug, and it's one I've been wanting to fix for a long time.
>
> I've done most of the groundwork for fixing it in the master branch,  
> but it's pretty far behind other stuff in the priority list.

Ok should I create a bug report for this?

-L

Luke Kanies

unread,
Jul 6, 2008, 11:54:49 PM7/6/08
to puppet...@googlegroups.com

On Jul 4, 2008, at 11:50 AM, Larry Ludwig wrote:

>
>
>
> On Jul 3, 6:00 pm, Luke Kanies <l...@madstop.com> wrote:
>> On Jul 3, 2008, at 10:32 AM, Larry Ludwig wrote:
>>
>
>>
>> This is a bug, and it's one I've been wanting to fix for a long time.
>>
>> I've done most of the groundwork for fixing it in the master branch,
>> but it's pretty far behind other stuff in the priority list.
>
> Ok should I create a bug report for this?

Hmm, I'm kind of of two minds on it.

If you file it as a feature, it's just going to get put into the
bottom of the pile for a long time.

You can file it if you want, I guess; it'll happen eventually either
way, but this way at least it's recorded.

--
Somewhere on this globe, every ten seconds, there is a woman giving
birth to a child. She must be found and stopped. -- Sam Levenson

Reply all
Reply to author
Forward
0 new messages