On Wed, Jan 19, 2011 at 11:30 AM, Stefan Schulte <
[email protected]> wrote:

> On Wed, Jan 19, 2011 at 09:25:35AM -0700, Thomas S Hatch wrote:
> > I know that the pacman type for Archlinux puppet support is not yet
> official
> > (I really need to write those darn tests), but I am having trouble with
> what
> > seems to be a race condition, and I was hoping that you guys could shed
> some
> > light on the situation.
> >
> > The vast majority of the time puppet runs without problems on my Arch
> > systems, but every now and then I get a false positive from a package
> > install, then a file which is requires the package gets laid down, then
> the
> > next time puppet runs the package fails to install because the file is
> > already on the system. But the real concern is that I am getting a false
> > positive for an installed package.
>
> What exactly do you mean by »false positive«? Puppet reports a package
> as installed while it's not (maybe wrong regex in instances classmethod)
> or that puppet reports a successful installation while in fact there
> were errors?
>
> When I understand your provider correctly you install a package and
> afterwards try to query that package with
>
>  pacman -Qi <PACKAGENAME>
>
> What does this command report for an absent package? If pacman returns
> just nothing your query method returns an empty hash. And an empty hash
> is true so your unless case in your install method is never checked.
>
> You should check what pacman returns when errors occur or if you try to
> install a package that is not in your database. If it returns something <>
> 0 you can strip your install method down to your pacman call.
> >
> > The pacman.rb type I am using can be found here:
> > https://aur.archlinux.org/packages/puppet/puppet/pacman.rb
> >
> > Please help me figure out why I am getting a false positive on this :)
> >
> > Also, the puppetmaster is on ubuntu 10.04 and is running puppet 0.25 and
> the
> > client is 2.6.4, will this cause any problems?
> >
> I guess this can be a problem too
>
> -Stefan
>


So I got this type from someone who wrote it a few years ago and was not
updating it, and I just patched it up to get it to work. Honestly, I have
been lazy about this.

After hearing your feedback I am going to rewrite this more or less from
scratch.

Thanks for the feedback, in a few days I will ask you all to look over a new
one and give me some suggestions if that is alright :)

-Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to