On 11/07/2017 10:24 AM, Merijn van den Kroonenberg wrote:
Merijn,

I patched the generate-new-scores.sh locally on sa-vm1 using your patch
file with a slight adjustment.  I changed the copied file name to
"72_active_before_grep.cf" just to make it a little more obvious.  We
will see how it looks tomorrow in the tmp working area on sa-vm1 and I
will reply with the results.

I looked at todays tmp/generate-new-scores/trunk-new-rules-set0 and I do
not see this patch applied. Can you even do uncommitted changes to code of
masses, or will it just be removed as a fresh checkout is done each time?


It was setup but I too noticed that it didn't create the 72_active_before_grep.cf but accidentally forgot about following up on that. I will check on that later this evening to get this in place before the next run in about 10 hours.


I am not seeing how the 72_active.cf file is generated before line 200
of generate-new-scores.sh.  I was going to go back a few days before

Its actually generated by
make > make.out 2>&1 || exit $?
at line 199

Kevin's commit to remove the other languages from MILLION_USD to perform
the same grep that you did.  I wanted to do this on the sa-vm1 server to
figure out how to fix the grep properly so Kevin can put back those
other languages.

Dave



From: Merijn van den Kroonenberg <[email protected]>
Sent: Wednesday, November 1, 2017 8:52 AM
To: David Jones
Subject: Eureka: truncation of 72_active.cf

Hi David,

After backtracking the scripts while verifying generated files I finally
came very close to the cause of the truncation issue.

The reason why the scoreset files and 72_scores.cf is truncated after
MILLION_USD is because the rules/72_active.cf is truncated.

This file is generated by build/mkrules (triggered from Makefile.pl)

It ends like this:

body MILLION_USD                /Million\b.{0,40}\b(?:United States?
Dollars?|USD)/i
describe MILLION_USD            Talks about millions of dollars
#score MILLION_USD 2
Binary file rules/72_active.cf matches

As you can see, this last line is a typical grep message. So it was not
hard to track it to the script causing this:

./masses/rule-update-score-gen/generate-new-scores.sh:202:grep -v ^score
rules/72_active.cf > rules/72_active.cf-scoreless
./masses/rule-update-score-gen/generate-new-scores.sh:203:mv -f
rules/72_active.cf-scoreless rules/72_active.cf

My theory is that grep encounters too many non-text characters in
rules/72_active.cf so its deciding its a binary file after all and stops
grepping the rest of the file.

As you can see in ./masses/rule-update-score-gen/generate-new-scores.sh
the original 72_active.cf is overwritten so I cannot see what is
actually in there that causes grep to panic.

I think if we patch scripts to make a copy right after mkrules runs, we
will be able to see or test why grep chokes.

I attached a patch file with proposal for debugging.

We are very close to the problem now I think.

Met vriendelijke groet,

Merijn van den Kroonenberg

Web2All B.V.
Gulickstraat 17
5931 LA Tegelen
Tel. +31 475 775511
Fax. +31 475 338290

[email protected] | www.web2all.nl





Reply via email to