On Wed, Apr 13, 2011 at 2:41 AM, Stefan Schulte
<stefan.schu...@taunusstein.net> wrote:
> On Tue, Apr 12, 2011 at 07:32:49PM -0700, Nigel Kersten wrote:
>>   Unless you happened to have members added to a group in exactly the
>> same order as they appear in your puppet manifests, Puppet considered
>> the 'is' and 'should' values to be out of sync due to ordering differences
>> between the arrays.
>>
>>   The fix came in two small parts.
>>
>>   a) Make the DirectoryService provider sort membership when querying 'is'
>>   b) Make insync? of property sort collected values if a given property
>>      is set to :array_matching_all
>>
>
> So the sorting is performed whenever I use :array_matching => all.
> What if I'm writing a type and have a property that takes an array
> and do care about the order?

Can we think of any cases where this might actually be desirable?
You've got array_matching_all on, but the order in which the items
appear in the DSL-specified array should be preserved?


> I havent looked at the code but wouln't it be possible to use
> Puppet::Property::List for the member property? Like the group
> property in the user type. This property class than should do the
> sorting for us (and I think we can drop the change_to_s override in the
> member property too)

That might indeed be cleaner. I'll have a look at that today.



-- 
Nigel Kersten
Product, Puppet Labs
@nigelkersten

-- 
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