-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Theo Van Dinter writes:
>On Mon, Nov 07, 2005 at 01:02:06PM -0800, Justin Mason wrote:
>> are you using "make" or running mkrules yourself?  because "make"
>> takes care of this by passing the name of the MANIFEST file.
>> "make" is the better option. ;)
>
>I'm running mkrules per the other discussions, however I have the same
>problem if I use make:
>
>$ rm -f rules/*
>$ svn -q up
>$ perl Makefile.PL < /dev/null > /dev/null
>$ make > /dev/null
>WARNING: MY_SERVERS_FOUND: renamed as T_MY_SERVERS_FOUND due to missing T_ =
>prefix
>WARNING: BOUNCE_MESSAGE: renamed as T_BOUNCE_MESSAGE due to missing T_ pref=
>ix
>WARNING: CRBOUNCE_MESSAGE: renamed as T_CRBOUNCE_MESSAGE due to missing T_ =
>prefix
>WARNING: VBOUNCE_MESSAGE: renamed as T_VBOUNCE_MESSAGE due to missing T_ pr=
>efix
>config: warning: score set for non-existent rule MPART_ALT_DIFF
>
>ERROR: LINT FAILED, suppressing output: rules/70_sandbox.cf
>$

that looks like it's fixed the prob I was talking about -- the "not in
MANIFEST" errors.

>> The fix is to copy the rule def'n for MPART_ALT_DIFF to your sandbox
>> file, as T_MPART_ALT_DIFF.  That way your sandbox is entirely
>> independent of changes to the core ruleset, too.
>
>MPART_ALT_DIFF is only referenced in the rulesrc dirs by the "core"
>files, so that's not quite going to work. :(

No, it would indeed work -- just cut and paste the line:

  body T_MPART_ALT_DIFF    eval:multipart_alternative_difference('99', '100')

it's the same eval call, but a different rule name, and in the
sandbox file only.

The aim, btw, is so that we can lint the rules during compilation.  Since
we cannot reliably lint line-by-line (consider a meta rule), we instead do
a file's-worth of rules at a time.

I suppose mkrules could be changed to "cat" all the files parsed so far,
so that a sandbox file can refer to a core file's rule by name (since
sandbox will be compiled after core); but I quite like the side-effect of
restricting sandbox files to only being able to affect rules in their own
file.

Thoughts?

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFDcACOMJF5cimLx9ARAinQAJ9WSXGPW3Da5eLC7Qfk7jUtOvSI6ACaAuBy
/HKjJrSmMQoPVSIvuMg2ppE=
=WHjk
-----END PGP SIGNATURE-----

Reply via email to