Package: hunspell Version: 1.7.2+really1.7.2-10+b2 Severity: normal X-Debbugs-Cc: jiri...@gmail.com
Dear Maintainer, `hunspell -D' shows either MacOS, obsolete or incorrect paths: ---%>--- $ hunspell -D SEARCH PATH: .::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/jiri/.openoffice.org/3/user/wordbook:/home/jiri/.openoffice.org2/user/wordbook:/home/jiri/.openoffice.org2.0/user/wordbook:/home/jiri/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo AVAILABLE DICTIONARIES (path is not mandatory for -d option): /usr/share/hunspell/en_US /usr/share/hunspell/cs_CZ /usr/share/hunspell/cs /usr/share/hunspell/it_IT /usr/share/hunspell/it_CH /usr/share/myspell/dicts/cs /usr/share/myspell/dicts/cs_CZ LOADED DICTIONARY: /usr/share/hunspell/en_US.aff /usr/share/hunspell/en_US.dic ---%<--- For example, hunspell in OpenBSD ports patches that in the following way: ---%>--- Index: src/tools/hunspell.cxx --- src/tools/hunspell.cxx.orig +++ src/tools/hunspell.cxx @@ -116,28 +116,14 @@ #include "../parsers/odfparser.hxx" #define LIBDIR \ - "/usr/share/hunspell:" \ - "/usr/share/myspell:" \ - "/usr/share/myspell/dicts:" \ - "/Library/Spelling" + "${PREFIX}/share/hunspell:" \ + "${LOCALBASE}/share/myspell:" \ + "${LOCALBASE}/share/myspell/dicts:" \ + "${LOCALBASE}/share/mozilla-dicts" #define USEROOODIR { \ - ".openoffice.org/3/user/wordbook", \ - ".openoffice.org2/user/wordbook", \ - ".openoffice.org2.0/user/wordbook",\ - "Library/Spelling" } + ".config/libreoffice/4/user/wordbook" } #define OOODIR \ - "/opt/openoffice.org/basis3.0/share/dict/ooo:" \ - "/usr/lib/openoffice.org/basis3.0/share/dict/ooo:" \ - "/opt/openoffice.org2.4/share/dict/ooo:" \ - "/usr/lib/openoffice.org2.4/share/dict/ooo:" \ - "/opt/openoffice.org2.3/share/dict/ooo:" \ - "/usr/lib/openoffice.org2.3/share/dict/ooo:" \ - "/opt/openoffice.org2.2/share/dict/ooo:" \ - "/usr/lib/openoffice.org2.2/share/dict/ooo:" \ - "/opt/openoffice.org2.1/share/dict/ooo:" \ - "/usr/lib/openoffice.org2.1/share/dict/ooo:" \ - "/opt/openoffice.org2.0/share/dict/ooo:" \ - "/usr/lib/openoffice.org2.0/share/dict/ooo" + "${LOCALBASE}/lib/libreoffice/share/wordbook" #define HOME getenv("HOME") #define DICBASENAME ".hunspell_" #define LOGFILE "/tmp/hunspell.log" ---%<--- Cf. https://raw.githubusercontent.com/openbsd/ports/master/textproc/hunspell/patches/patch- src_tools_hunspell_cxx . ---%>--- $ hunspell -D 2>&1 | awk 'function cmd(path) { system(sprintf("ls -ld \"%s\"", path)) } /SEARCH PATH:/ { getline; split($0, paths, ":"); for (i in paths) paths[i] ? cmd(paths[i]) : true }' drwx--x---+ 80 jiri jiri 8192 Jul 27 17:07 . drwxr-xr-x. 2 root root 170 Jul 9 12:46 /usr/share/hunspell drwxr-xr-x. 3 root root 19 Jan 5 2024 /usr/share/myspell drwxr-xr-x. 2 root root 68 Jan 5 2024 /usr/share/myspell/dicts ls: cannot access '/Library/Spelling': No such file or directory ls: cannot access '/home/jiri/.openoffice.org/3/user/wordbook': No such file or directory ls: cannot access '/home/jiri/.openoffice.org2/user/wordbook': No such file or directory ls: cannot access '/home/jiri/.openoffice.org2.0/user/wordbook': No such file or directory ls: cannot access '/home/jiri/Library/Spelling': No such file or directory ls: cannot access '/opt/openoffice.org/basis3.0/share/dict/ooo': No such file or directory ls: cannot access '/usr/lib/openoffice.org/basis3.0/share/dict/ooo': No such file or directory ls: cannot access '/opt/openoffice.org2.4/share/dict/ooo': No such file or directory ls: cannot access '/usr/lib/openoffice.org2.4/share/dict/ooo': No such file or directory ls: cannot access '/opt/openoffice.org2.3/share/dict/ooo': No such file or directory ls: cannot access '/usr/lib/openoffice.org2.3/share/dict/ooo': No such file or directory ls: cannot access '/opt/openoffice.org2.2/share/dict/ooo': No such file or directory ls: cannot access '/usr/lib/openoffice.org2.2/share/dict/ooo': No such file or directory ls: cannot access '/opt/openoffice.org2.1/share/dict/ooo': No such file or directory ls: cannot access '/usr/lib/openoffice.org2.1/share/dict/ooo': No such file or directory ls: cannot access '/opt/openoffice.org2.0/share/dict/ooo': No such file or directory ls: cannot access '/usr/lib/openoffice.org2.0/share/dict/ooo': No such file or directory $ ls -l ~/.config/libreoffice/4/user/wordbook total 4 -rw-r--r--. 1 jiri jiri 3917 Jul 20 22:04 standard.dic ---%<--- * What led up to the situation? I was checking how hunspell might work with LO dictionaries. * What exactly did you do (or not do) that was effective (or ineffective)? Next, I checked if `hunspell' is able to read my LO dict, but it wasn't. * What was the outcome of this action? hunspell returns "bad (rejected) work - with '&', that is, with suggestion - for a work which is correct and present in my dictionary; an example: ---%>--- $ hunspell -d cs_CZ <<< "autobusáků" Hunspell 1.7.2 & autobusáků 1 0: autobusů ---%<--- * What outcome did you expect instead? I expected the previous command would return '*' as the word is present it my LO user dict: ---%>--- $ grep -n 'autobusáků' ~/.config/libreoffice/4/user/wordbook/standard.dic 114:autobusáků ---%<--- The workaround is to use `-p ~/.config/libreoffice/4/user/wordbook/standard.dic', but I would expect `hunspell' would use such a path automatically - see OpenBSD hunspell diff. ---%>--- hunspell -d cs_CZ -p ~/.config/libreoffice/4/user/wordbook/standard.dic <<< "autobusáků" error - iconv: ISO8859-2 -> UTF-8 Hunspell 1.7.2 * ---%<--- -- System Information: Debian Release: trixie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.9.9-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: SELinux: enabled - Mode: Permissive - Policy name: default Versions of packages hunspell depends on: ii hunspell-en-us [hunspell-dictionary] 1:2020.12.07-2 ii hunspell-it [hunspell-dictionary] 1:24.8.0~rc1-1 ii libc6 2.39-6 ii libgcc-s1 14.1.0-5 ii libhunspell-1.7-0 1.7.2+really1.7.2-10+b2 ii libncursesw6 6.5-2 ii libreadline8t64 8.2-4 ii libstdc++6 14.1.0-5 ii libtinfo6 6.5-2 ii myspell-cs [myspell-dictionary] 20040229-8 hunspell recommends no packages. Versions of packages hunspell suggests: ii unzip 6.0-28 -- no debconf information