Bug#501947: /usr/bin/bf_compact-sqlite: tries to use wrong version of bogofilter/bogoutil

Matthias Andree matthias.andree at gmx.de
Thu Oct 16 00:47:54 CEST 2008


On Wed, 15 Oct 2008, Clint Adams wrote:

> On Sat, Oct 11, 2008 at 10:24:26PM +0300, Mika Tiainen wrote:
> > mika at aeon:~$ bf_compact-sqlite .bogofilter/
> > /usr/bin/bf_compact-sqlite: 50: bogofilter: not found
> > /usr/bin/bf_compact-sqlite: 76: bogofilter: not found
> > /usr/bin/bf_compact-sqlite: 87: bogoutil: not found
> > .bogofilter/wordlist.db corrupted, aborting.
> > 
> > "BOGOFILTER=bogofilter-sqlite BOGOUTIL=bogoutil-sqlite bf_compact-sqlite .bogofilter/" works.
> 
> Anyone object to this patch?

Fine by me.

Sorry, transformed program names were entirely off my radar screen.

Do we need like patches for other scripts and/or docs?

> Index: src/bf_compact.in
> ===================================================================
> --- src/bf_compact.in	(revision 6746)
> +++ src/bf_compact.in	(working copy)
> @@ -10,8 +10,8 @@
>  
>  set -e # die on errors
>  
> -: ${BOGOFILTER:=bogofilter}
> -: ${BOGOUTIL:=bogoutil}
> +: ${BOGOFILTER:=@transformed_bogofilter@}
> +: ${BOGOUTIL:=@transformed_bogoutil@}
>  
>  if [ -z "$1" ] ; then
>      echo 'usage: bf_compact source_dir [wordlist_name...]'
> Index: configure.ac
> ===================================================================
> --- configure.ac	(revision 6746)
> +++ configure.ac	(working copy)
> @@ -838,6 +838,12 @@
>         ;;
>  esac
>  
> +bogofilter_transform=`echo "${program_transform_name}" | sed -e 's,\\\\\\\\,\\\\,g;s,\\\$\\\$,\$,g'`
> +transformed_bogofilter=`echo bogofilter | sed -e "$bogofilter_transform"`
> +transformed_bogoutil=`echo bogoutil | sed -e "$bogofilter_transform"`
> +AC_SUBST(transformed_bogofilter)
> +AC_SUBST(transformed_bogoutil)
> +
>  # Note the \\\\ for backslashes.  Autoconf eats one layer, leaving \\
>  
>  AC_DEFINE(CURDIR_S, ".", [Define name of current directory (C string)])

-- 
Matthias Andree



More information about the bogofilter-dev mailing list