On May 20, 2008, at 4:21 AM, David Schmitt wrote:

> I believe I wrote something up about this a while ago, although I  
> cannot find
> it anymore.
>
> Syntaxwise this would tie in best for me in the override syntax:
>
> Package[*] { require => Class[apt] }
>
> Although this would of course immediately lead to a loop on  
> Package[apt].


Other than that last little fatal bit, that should work well.  It  
wouldn't have really been possible six months ago, but the recent  
refactorings make this pretty easy.

Any ideas how to fix the other problem?  Seems pretty hard.  It's  
probably a better idea just to specify the relationship directly to  
the apt-get command, which skips the problem but might expose more of  
the class internals than we'd normally like.

Otherwise, anyone want to take a crack at solving it?  I'd recommend a  
globbing syntax in the language (so it supported more than just '*'),  
and then it's just a question of iterating over all of the package  
resources in the catalog (during compilation).

The hard part is that this has to happen once the catalog is done  
being compiled (otherwise it would only affect those resources that  
had already been created when the statement is evaluated).  You'd  
probably need to to add some code to parser/compiler.rb in the  
'finish' method.

-- 
I love deadlines. I like the whooshing sound they make as they fly by.
     --Douglas Adams
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


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