Re: ifvarclass when file does NOT exist

2011-06-28 Thread Aleksey Tsalolikhin
Yeah, I get what you are saying. I guess it's a knowledge management issue - if you compress things too much, you risk losing data, or you raise the conceptual overhead for being able to parse the compressed version. Yours fondly, -at ___ Help-cfengine

Re: ifvarclass when file does NOT exist

2011-06-26 Thread Nicolas Charles
On 24/06/2011 20:19, Aleksey Tsalolikhin wrote: > > commands: > > "/usr/bin/pecl install fileinfo" > > ifnotfunc => fileexists("/usr/lib64/php/modules/fileinfo.so"); You could simply do : classes: "fileinfo_to_install" not => fileexists("/usr/lib64/php/modules/file

Re: ifvarclass when file does NOT exist

2011-06-24 Thread Aleksey Tsalolikhin
On Thu, Jun 23, 2011 at 5:41 PM, Daniel V. Klein wrote: > > ifvarclass() says "if the named class exists, do something" > > fileexists() says "if the named file exists, make the class expression > 'true'" and that is used to create a named class. > > The two are incompatible (because the latter i

Re: ifvarclass when file does NOT exist

2011-06-23 Thread Daniel V. Klein
Aleksey/Seva- So you want to recreate "make" in CFEngine? :-) ifvarclass() says "if the named class exists, do something" fileexists() says "if the named file exists, make the class expression 'true'" and that is used to create a named class. The two are incompatible (because the latter is onl

Re: ifvarclass when file does NOT exist

2011-06-23 Thread Aleksey Tsalolikhin
On Fri, Apr 23, 2010 at 3:38 AM, Сева Глущенко wrote: > Hello folks, > > I'm trying to make a promise which creates files when their > counterparts not exist yet. But when I'm writing something like > >    compile:: >       "$(base)/(.*)/.compile" >               create          => "true", >      

Re: ifvarclass when file does NOT exist

2010-04-23 Thread Michael Potter
You may be right. In any case, please post your solution as I think it is an interesting problem to solve =) 2010/4/23 Сева Глущенко : > Michael, > > When we're going to any shell/perl construction, it would be rather > natural to write a module instead. Of course I'm going to file a FR, > but I a

Re: ifvarclass when file does NOT exist

2010-04-23 Thread Michael Potter
You have to defined a class separately: classes: "notthere" not => fileexists("$(dst)/$(match.1)"); On Fri, Apr 23, 2010 at 8:38 PM, Сева Глущенко wrote: > Hello folks, > > I'm trying to make a promise which creates files when their > counterparts not exist yet. But when I'm writing somethin

ifvarclass when file does NOT exist

2010-04-23 Thread Сева Глущенко
Hello folks, I'm trying to make a promise which creates files when their counterparts not exist yet. But when I'm writing something like compile:: "$(base)/(.*)/.compile" create => "true", ifvarclass => !canonify(fileexists("$(dst)/$(match.1)