On 15/03/11 13:24, Dominic Cleal wrote:
> On 10/03/11 08:03, Juerg Walz wrote:
>> Thanks for the feedback, Dominic.
>> I've never actually ran it with debugging turned on (again, I'm fairly
>> new to Puppet, and Ruby). I need to read up on the prefetching and
>> what's expected in the alias. My mods up to now were mostly trial-and-
>> error...
>>
>> BTW I've just changed that bit of code to handle the case where the
>> shortname is different to the package filename.
> 
> Yep, thanks.  That should now stop Puppet querying pkgutil for all long
> names though it's still going to make extra queries for short names.  I
> think this is pretty much unavoidable unless pkgutil can output both
> long names and short names.

A discussion started on -users about the state of the provider, which
made me realise some of the tests in the spec weren't passing with these
changes.  I've taken a closer look this evening and realised that the
change to assume lines from -c were aliases of other packages was
problematic when pkgutil downloads catalogs etc.

What I've now done is to call -a as well as -c to prefetch the package
instances, which gives us the aliased name as well as the full package
name.  With this we can create two instances, one for each name with the
same information.  This means we no longer have to call out to pkgutil
-c --single for every package resource that uses an alias instead of the
full package name.

The provider should be much more robust now as I've added a few more
tests to cope with the edge cases.

I'll send the extra commits to the list now, they're also here:
https://github.com/domcleal/puppet/tree/tickets/master/4258-dev

-- 
Dominic Cleal
Red Hat Consulting
m: +44 (0)7818 512168

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

Reply via email to