ASPELL-AUTOBUILDHASH(8)
π ASPELL-AUTOBUILDHASH π
okay bestie, gather round, because this is the aspell-autobuildhash page from section 8 of the manual, and it's lowkey one of those scripts that just quietly does its thing so your spellchecker works. no cap.
β¨ NAME β¨
aspell-autobuildhash β autobuilding aspell hash files for some dicts π
πΈ SYNOPSIS πΈ
aspell-autobuildhash [--force]
Options:
--debug Show extra info about aspell-autobuildhash
internal work.
Will also enable aspell affix validation.
--dry-run Show what would be done, but do nothing real.
--force Rebuild the hash file for all dicts providing a
compat file skipping the test.
--triggered Tell the script that is run in the triggers stage.
π¦ DESCRIPTION π¦
So aspell-autobuildhash is a script that manages the whole autobuild situation for aspell hash files, and it's literally meant to be called from the dictionaries-common tools. π
Here's the vibe: it peeks at the aspell compatibility level, and it peeks at the compatibility level that the hash file was built with (if there even is a hash file), and then it decides whether the hash needs to be rebuilt or not. that's the whole personality.
heads up though β this script will only work on aspell packages that were actually prepared to use it. for any other aspell dict package it just... does nothing. sits there. vibes. π
π OPTIONS π
--debugβ spills some extra tea aboutaspell-autobuildhash's internal work. also turns on aspell affix validation, so that's a two-for-one. β¨--dry-runβ shows you what would be done, but does nothing real. window shopping, basically. ποΈ--forceβ rebuilds the hash file for all dicts that provide a compat file, regardless of the compatibility levels found. no questions asked.--triggeredβ tells the script that it's being run in the triggers stage.- When it's running under dpkg control, it will not try to set the
aspell-autobuildhashtrigger, and instead runs the realaspell-autobuildhashcode. - When it's not running under dpkg control, the real code runs always anyway, and
--triggeredhas no real effect. it's giving decorative. π
- When it's running under dpkg control, it will not try to set the
π PACKAGE MAINTAINERS π
listen up, maintainers, this part is for you π«Ά
To use this whole system, aspell-autobuildhash expects a $lang.compat file sitting in /var/lib/aspell (and yes, $lang is the lang basename with the variant if there is one β so $lang is something like gl-minimos or en). That file should contain the aspell compatibility version for the last successful build, or "0", or it can be an empty file if the hash is to be rebuilt β which is exactly the situation for dictionary installation and upgrades.
When upgrading aspell, the script checks whether the version in $lang.compat is different from aspell.compat, and rebuilds if it is, updating $lang.compat with the new value. slay. π
Wordlists should already be compressed before all this β either with gzip (and their extensions set as .mwl.gz or .wl.gz), or preferably first with aspell prezip and then gzipped (with the .cwl.gz extension). This applies both to plain wordlists and to munched wordlists (in the ispell way) if you use affix compression. π
If your package is going to provide a single hash, install the prezipped+gzipped wordlist as /usr/share/aspell/$lang.cwl.gz or, if prezip is not used, as /usr/share/aspell/$lang.mwl.gz.
If your package is going to provide more than one aspell hash for the same $lang, you'll need to place each compressed wordlist as e.g. /usr/share/aspell/$subdict.cwl.gz, plus the common $lang.compat as described above. Then create a /usr/share/aspell/$lang.contents file with the base names of the subdicts, one in a line. For English that will contain, amongst other possible lines:
en-common
en-variant_0
en-variant_1
en-variant_2
en_CA-w_accents-only
No need to use this file if a single hash is being created. π
The dictionaries-common scripts will call this script internally and create a single hash file at /var/lib/ispell/$lang.rws, or hash files at /var/lib/ispell/$subdict.rws. You must set a symlink to that files from /usr/lib/aspell/$lang.rws or /usr/lib/aspell/$subdict.rws as appropriate.
Aspell dictionary packages using this script must make sure that $lang.compat is reset on every new install/upgrade, so the hash gets rebuilt. They must also make sure that $lang.compat and all of /var/lib/aspell/$lang.rws or /var/lib/aspell/$subdict.rws are removed on package removal. no leaving crumbs, bestie. π§Ή
As of version 1.10, the installdeb-aspell script will understand the 'auto-compat' and 'auto-contents' fields in the $dict.info-aspell file to help with this by adding the needed debhelper snippets. Put the base name(s) of your compat and contents file(s) in that entry and carefully check the resulting maintainer scripts after build. π
note: you are no longer suggested to ship empty files at any of/var/lib/aspell/$lang.compat,/var/lib/aspell/$lang.rwsor/var/lib/aspell/$subdict.rwsβ instead, explicitly create/update them on install and explicitly remove them on removal. periodt.
The aspell maintainer should also call this script from the package postinst. When comparing versions, it will get the aspell version from the file /usr/share/aspell/aspell.compat.
π AUTHORS π
Agustin Martin <agmartin@debian.org>
β COPYRIGHT β
Copyright (C) 2004-2024 Agustin Martin <agmartin@debian.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
okay that's the whole thing, you ate that π
β¨ this was ASPELL-AUTOBUILDHASH(8), source version 1.31.4, dated 2026-3-22 β and that's the sign-off, bestie, go rebuild some hashes π¦π
π¦ where this page comes from
- ubuntu resolute: dictionaries-common 1.31.4
- ubuntu stonking: dictionaries-common 1.31.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms