[Dict-common-dev] RFC: Allowing ispell dictionaries hash build at postinst

Agustín Martín Domingo agmartin@aq.upm.es
Thu, 20 Feb 2003 18:20:53 +0100


Ivo Timmermans wrote:
 >
 >
 > I'm really in favor of doing this (mainly because it makes the
 > packages Arch: all, like you said), but the user must be able to skip
 > or defer the hash generation.  To do this, it might be a good idea to
 > make a tool to do this whenever the sysadmin is ready for it.
 >

The tests I did rely on an ispell_autobuildhash script that compares
contents of a dict compat file (it can be a file created with a touch,
so it will autorebuild on install) and the ispell compat file (or its
upstream version if none is present). After the hash is created the dict
compat file is overwritten with the contents of the ispell compat file
(or the ispell upstream version). All outdated hashes are rebuilt from
the first postinst, so I expect buildhash to be still in memory cache
and things go a bit faster, and an error message will show which hash
file was trying to build if an error appear, to avoid confusing users
since the error can be shown in other package postinst.

Since the time required for rebuilding the hash is small when compared 
with the installation times, I am not sure deferring it does worth, but 
this of course will need more testing. I see other problem about that, 
the dictionary will be unuseable until the sysadmin remember to do that.

This is the last version of the script I used for the testings

http://corbu.aq.upm.es/~agmartin/linux/store/ispell_autobuildhash

It only checks against ispell or compat files, not against previous 
packages for the same dictionary, but this later is unfortunately not 
that easy (at least I still do not have it clear).

Cheers,

-- 
=====================================================================
Agustin Martin Domingo, Dpto. de Fisica, ETS Arquitectura Madrid,
(U. Politecnica de Madrid)  tel: +34 91-336-6536, Fax: +34 91-336-6554,
email:agmartin@aq.upm.es, http://corbu.aq.upm.es/~agmartin/welcome.html