[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Module variables being set late
From: |
Chip Seraphine |
Subject: |
Re: Module variables being set late |
Date: |
Thu, 8 Jan 2004 11:39:26 -0600 |
User-agent: |
KMail/1.5 |
Sounds useful, although if the patch is incorproated it should be controlled
by a command-line option or something( since it changes behavior).
Unfortunately, this doesn't really address what is breaking me-- the problem
I'm having is that modules appear to be executing in a sequence that seems at
odds with the actionsequence definition.
On Wednesday 07 January 2004 17:37, Wipf, Stefan wrote:
> I previously posted a simple patch for nesting imports:
> Sorry, I don't remember which version of cfengine,
> but the patch is simple enough.
>
>
>
> diff parse.c.original parse.c.fix
> 127c127
> < { struct Item *ptr;
> ---
>
> > { struct Item *ptr, *nextptr
>
> 216c216,224
> < ParseFile(filename,sp);
> ---
>
> > nextptr = ptr->next;
> > while (VIMPORT != NULL) { VIMPORT = VIMPORT->next; }
> > ParseFile(filename,sp);
> > if (VIMPORT != NULL)
> > {
> > ptr->next = VIMPORT;
> > while (VIMPORT->next != NULL) { VIMPORT = VIMPORT->next; }
> > VIMPORT->next = nextptr;
> > }
>
> This patch will change the behavior as follows:
>
> example:
>
> cfagent.conf:
> import:
> cf.classes
> cf.variables
> cf.main
>
> cf.classes:
> import:
> cf.classes1
> cf.classes2
> ...
>
> Without the patch:
> importing cf.classes
> importing cf.variables
> importing cf.main
> importing cf.classes1
> importing cf.classes2
>
> With the patch:
> importing cf.classes
> importing cf.classes1
> importing cf.classes2
> importing cf.variables
> importing cf.main
>
> Mark.Burgess@iu.hio.no wrote:
> > On 7 Jan, Wheeler, John wrote:
> > >>If you
> > >> follow
> > >> the suggested structure and use cfagent.conf only to import the
> > >
> > > content
> > >
> > >> of the configuration, then it never matters that imports are done "at
> > >
> > > the
> > >
> > >> end".
> > >
> > > [Wheeler, John]
> > > I didn't realize this was a limitation/feature/characteristic/property
> > > (i.e. don't read into the adjective) of cfengine. I have many nested
> > > imports of cfengine some as deep as 5 levels.
> > >
> > > Is this bad? Will this fail with future releases of cfengine?
> >
> > No - nesting is ok. But the nesting is evaluated linearly.
> > Nested evaluation is technically challenging and not something
> > I want to spent time on.
> >
> > M
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
> > Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@gnu.org
> > http://mail.gnu.org/mailman/listinfo/help-cfengine
- Re: Module variables being set late, (continued)
RE: Module variables being set late, Wheeler, John, 2004/01/07
RE: Module variables being set late, Wheeler, John, 2004/01/07
RE: Module variables being set late, Wheeler, John, 2004/01/07
- Re: Module variables being set late, Mark . Burgess, 2004/01/07
- Re: Module variables being set late, Wipf, Stefan, 2004/01/07
- Re: Module variables being set late, Mark . Burgess, 2004/01/08
- Re: Module variables being set late,
Chip Seraphine <=
- Re: Module variables being set late, Mark . Burgess, 2004/01/10
- Re: Module variables being set late, Chip Seraphine, 2004/01/09