[PATCH] Re: Recovering bogofilter in Evo... how can we do it?

Paul Smith paul at mad-scientist.net
Wed Jan 14 19:48:44 UTC 2015

On Wed, 2015-01-14 at 09:27 +0000, Iain Lane wrote:
> Which means, unless I'm mistaken (I only looked briefly), that someone
> so interested could submit a patch to Evolution, preferably upstream,
> to move the check from build to runtime.

I took a look at Evolution's code.  Evolution already makes a runtime
check for the bogofilter program and disables the plugin if it doesn't
exist: modules/bogofilter/evolution-bogofilter.c:bogofilter_available()

The problem is that if you don't have bogofilter installed then the
configure step of the source will fail with an error, unless you
--disable-bogofilter which is apparently why this was added.

However, that's not actually true: if you set the environment variable
BOGOFILTER to a value before you invoke configure then whatever value
you provide is used as the path to the bogofilter program that Evolution
checks for at build time... and the configure step DOES NOT CHECK that
this program exists, until runtime as above.

So, for the Ubuntu package, it should be sufficient to change the build
of Evolution to set BOGOFILTER=/usr/bin/bogofilter before running
"configure".  It doesn't look like there's any nice package-controllable
way to add env.vars. to the configure line in cdbs, but you could add
this to the "rules" file:

  export BOGOFILTER=/usr/bin/bogofilter

then remove --disable-bogofilter from DEB_CONFIGURE_EXTRA_FLAGS, and it
should work just as we'd like.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: evo-bogofilter.patch
Type: text/x-patch
Size: 612 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20150114/afcdc54d/attachment.bin>

More information about the ubuntu-desktop mailing list