Re: Wrong debug message in src/syntax.c
Mark Burgess <[email protected]> Mon, 07 Dec 2009 10:02:43 +0100
| Newsgroups | gmane.comp.sysutils.cfengine.bugs |
|---|---|
| Message-ID | <[email protected]> |
Jean-No=EBl Rivasseau wrote:
> Hi,
> =
> First why does the code:
> =
> bundle common global
> {
> vars:
> any::
> "AUTHORIZED_IPS" slist =3D> {"127.0.0.1", "192.168.0/24"}; =
> }
> =
> body server control
> {
> trustkeysfrom =3D> @{global.AUTHORIZED_IPS};
> allowconnects =3D> @{global.AUTHORIZED_IPS};
> maxconnections =3D> "10";
> logallconnections =3D> "true";
> }
> =
> produces this error:
> =
> rhs is a scalar, but lhs (slist) is not list type, near token
> '@{global.AUTHORIZED_IPS}'
> =
> I have to write it as
> =
> trustkeysfrom =3D> { @{global.AUTHORIZED_IPS} };
> =
> to get it working, which is a cumbersome syntax. Is this "normal", eg
> the expected behavior? I think @{global.AUTHORIZED_IPS} should be enough
> for cf-engine to recognize it is dealing with a list.
This is according to expectations, though one could argue as you do.
> Second, the error message
> =
> rhs is a scalar, but lhs (slist) is not list type, near token
> '@{global.AUTHORIZED_IPS}'
> =
> which comes from the
> =
> CheckConstraintTypeMatch() function in syntax.c, is obviously wrong, it s=
hould read =
> =
> =
> =
> rhs is a scalar, but lhs (slist) is not a scalar type.
Thanks, fixed