[pology] Error running check-rules

Chusslove Illich caslav.ilic at gmx.net
Fri Aug 31 00:44:21 PDT 2012


> [: mvillarino :]
>   $ posieve.py -b check-rules gl/messages/ -srule:"expression_if/when disabled"
>   ----------------------------------------
>   Using internal rules for language 'gl'.
>   Loaded 1 rule [kde].
>   Selected rules: expression_if/when disabled.
>   Active rules define 1 distinct filter set.
>   Using internal rules for language 'gl'.
>   posieve.py: [error] Some explicitly selected rules are missing: expression_if/when disabled.

What had happened here is the following. If a rule is explicitly selected,
but it "does not exist", this error is signalled. Or else the user may think
that no message fails the rule, whereas no rule is applied at all. "Does not
exist" here is observed with respect to the particular environment. So, if
environment X applies to file A and the selected rule does not exist in X
(whereas it may exist in Y), this error happens. In your case, rule
'expression_if/when disabled' exists only in environment 'kde', but
kde-baseapps/kategdbplugin.po does not define any environment (no
X-Environment header), so when this file is about to be processed the rule
no longer exists from its viewpoint, and hence the error.

I don't know if I should change something here, or what. In effect, exactly
that which should have happened did happen: you were prevented from thinking
that a catalog fully passes a rule, when in fact the rule would not be
applied at all. Of course, you can always fix it on your side by making sure
that all catalogs have X-Environment header. Or, you could run the sieve
with -senv:kde parameter, although this is OK only if all catalogs should
have exactly the same environment, because the sieve parameter overrides
X-Environment header.

By the way, adding -a option to posieve will make it announce (print file,
line, entry number) each message as it is about to be processed. When you
observe a failure, you can rerun with -a to see exactly where the failure
happens.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.nedohodnik.net/pipermail/pology-nedohodnik.net/attachments/20120831/c29e14dc/attachment-0002.pgp>


More information about the pology mailing list