SA Bugzilla – Bug 7505
build/mkupdates/listpromotable deprecated goto
Last modified: 2021-04-21 10:36:18 UTC
The daily rules promotion script, build/mkupdates/run_nightly, has the following error in the listpromotable script: + promote_active_rules + pwd + /usr/bin/perl build/mkupdates/listpromotable /usr/local/spamassassin/automc/svn/trunk HTTP get: http://ruleqa.spamassassin.org/1-days-ago?xml=1 Use of "goto" to jump into a construct is deprecated at build/mkupdates/listpromotable line 85.
This one is over my head since I don't have a lot of experience with perl. I think the goto needs to be replaced with function calls but not sure.
Created attachment 5597 [details] Use "redo" instead of deprecated "goto" (jumping into a construct) to restart the current foreach iteration.
Use "redo" instead of deprecated "goto" (jumping into a construct) to restart the current foreach iteration. I don't fully understand when the first if-block is (not) entered. Thus using a dedicated variable to ensure entering the if-block in the case of restarting the iteration with a new offset. Review appreciated. Not comitting to trunk yet, to not risk breaking rules promotion with a release pending. I cannot easily test the actual code in listpromotable. Dave, any chance you can test this?
I don't know of any way to test this without committing to production and waiting to see how the next run goes.
OK, then please hold off until after the release of 3.4.2 so we know everything is good for that if you don't mind?
What is your version of perl? I am still running CentOS 6 so it's v5.14.1. Can you show what the command is in the spamfilter-check-config.sh so I can see the whole line with arguments? I would like to run the same command on my server to see if that makes a difference.
Patch testedly works. Sending trunk/build/mkupdates/listpromotable Transmitting file data .done Committing transaction... Committed revision 1889050.