On Oct 19, 2010, at 6:51 AM, Markus Roberts wrote:

> 
> I've clearly forgotten how this aspect of ralsh works.  How does an instances 
> method that returns [] fix anything?  Does this just make the file management 
> work but not file querying?  E.g., what does 'puppet resource file' do here?  
> It would normally list all instances, but that's obviously not going to 
> happen.
> 
> As I'd noted on the ticket when I set it as "code insufficient" these seem to 
> be two mostly unrelated changes as far as I can tell.  It seems instances was 
> set to return [] because "the global resource list (self[path]) is 
> deprecated" the instance method was "way too slow."  There may be reasoning 
> here that I'm not seeing, but (by definition) I'm not seeing it.


Ok.

My guess, then, is that the instances method is set to return [] because the 
system requires it return something (which is probably a bug), and this way it 
just returns an empty set rather than failing.

The changes probably are unrelated, so now 'puppet resource file' doesn't work, 
but at least it doesn't fail...?  That is, it doesn't throw an exception, but 
it doesn't do anything useful, either.

There should be some method of using the file recursion in 'puppet resource' to 
query the state of more than one file.

-- 
Work is not always required. There is such a thing as sacred idleness.
        -- George MacDonald
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199



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