Bug 17019
| Summary: | "dict -r" has no effect | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Ivan Zakharyaschev <imz> |
| Component: | dict | Assignee: | Vitaly Lipatov <lav> |
| Status: | NEW --- | QA Contact: | qa-sisyphus |
| Severity: | minor | ||
| Priority: | P2 | CC: | amakeenk, cheusov, lav |
| Version: | unstable | ||
| Hardware: | all | ||
| OS: | Linux | ||
Проверка актуальности.
Состояние:
Source-пакет dictd: Sisyphus и p11 — 1.13.3-alt1, p10 — 1.12.1-alt4.1.
В исходниках 1.13.3 опция -r/--raw подключена: регистрируется флаг DBG_RAW ("raw"), в коде присутствуют отладочные выводы "* Read", "* Send", "* Status". Однако по коду нельзя подтвердить, что verbose-вывод реально появляется при запросе к dictd-серверу.
Решение:
ретест «dict -r» на Sisyphus. Баг не закрывать до подтверждения.
Воспроизводится на dict-1.13.3-alt1 (libmaa-1.5.1-alt1), Sisyphus x86_64 от 2026-09-16, локальный dictd-1.13.3-alt1 с базами foldoc/jargon/mueller7:
$ LC_ALL=C dict -h localhost -m -s exact -r hacker >r.out 2>r.err
$ LC_ALL=C dict -h localhost -m -s exact hacker >n.out 2>n.err
$ diff n.out r.out && echo IDENTICAL
IDENTICAL
$ wc -c r.err
0 r.err
То же с --debug raw. Ни одной строки "* Send/* Read/* Status" нет.
Причина: в dict.c трассировка идёт через PRINTF(DBG_RAW, ...), а в libmaa
#define PRINTF(flag,arg) if (dbg_test(flag)) { log_info arg; } (maa.h:443)
log_info() сразу возвращается, пока лог не открыт: if (!logOpen) return; (log.c:307).
dictd.c открывает лог (log_stream("dictd", stderr)), а клиент dict.c не вызывает log_stream/log_file вообще, поэтому вся отладка -r/--debug молча теряется. В dict 1.8.0 PRINTF в libmaa печатал через printf, отсюда «раньше работало».
Исправление — одна строка в dict.c после maa_init(argv[0]):
log_stream("dict", stderr);
(для stderr/stdout log.c печатает только тело сообщения, без преамбулы с датой/хостом).
Апстримного тикета в github.com/cheusov/dictd нет. Перевешиваю на сопровождающего (первый в ACL dictd).
|

Description
Ivan Zakharyaschev 2008-09-05 01:40:10 MSDdict-1.9.15-alt5 "man dict" says: -r or --raw Be very verbose: show the raw client/server interaction. , but it has no effect: $ dict -s suffix brigens -r -m deu-eng: u:brigens $ dict -s suffix brigens -r No definitions found for "u:brigens" $ -- no verbose information, cf. how it used to be on previous versions of dict (https://bugzilla.altlinux.org/show_bug.cgi?id=1709 ): $ dict -s suffix brigens -r * Send/2: client \"dict 1.8.0/rf on Linux 2.4.20-alt0.1-adv-up\" match * suffix \"brigens\" * Read: 220 arrakis.zephyrous dictd 1.8.0/rf on Linux 2.4.20-alt0.1-adv-up <auth .mime> <<a href="mailto:50.10966.1039706374@arrakis.zephyrous>" target="_new">50.10966.1039706374@arrakis.zephyrous></a>; * Status = 220 * Processed 2 * Read: 250 ok * Status = 250 * Processed 3 * Processed 4 * Read: 152 1 matches found * Status = 152 * Text: deu-eng \"ц╪brigens\" * Text: . * Read: 250 ok [d/m/c = 0/1/1055598; 1.000r 0.000u 0.000s] * Status = 250 * Processed 10 * Send/13 * Processed 13 * Send/14: define deu-eng \"?brigens\" quit * Read: 552 no match [d/m/c = 0/0/16; 0.000r 0.000u 0.000s] * Status = 552 * Processed 11 No definitions found for \"?brigens\" * Processed 1 * Read: 221 bye [d/m/c = 0/0/0; 1.000r 0.000u 0.000s] * Status = 221 * Processed 14 -- it used to be verbose!