<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>17019</bug_id>
          
          <creation_ts>2008-09-05 01:40:10 +0400</creation_ts>
          <short_desc>&quot;dict -r&quot; has no effect</short_desc>
          <delta_ts>2026-10-20 19:03:12 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>dict</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>cheusov</cc>
    
    <cc>lav</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77058</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2008-09-05 01:40:10 +0400</bug_when>
    <thetext>dict-1.9.15-alt5

&quot;man dict&quot; 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 &quot;u:brigens&quot;
$ 

-- 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 \&amp;quot;dict 1.8.0/rf on Linux 2.4.20-alt0.1-adv-up\&amp;quot;
match * suffix \&amp;quot;brigens\&amp;quot;
* Read: 220 arrakis.zephyrous dictd 1.8.0/rf on Linux 2.4.20-alt0.1-adv-up &amp;lt;auth                                                         
.mime&amp;gt; &amp;lt;&lt;a href=&quot;mailto:50.10966.1039706374@arrakis.zephyrous&amp;gt&quot; target=&quot;_new&quot;&gt;50.10966.1039706374@arrakis.zephyrous&amp;gt&lt;/a&gt;;
* Status = 220
* Processed 2
* Read: 250 ok
* Status = 250
* Processed 3
* Processed 4
* Read: 152 1 matches found
* Status = 152
* Text: deu-eng \&amp;quot;ц╪brigens\&amp;quot;
* 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 \&amp;quot;?brigens\&amp;quot;
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 \&amp;quot;?brigens\&amp;quot;
* 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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>298463</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2026-09-14 12:36:43 +0300</bug_when>
    <thetext>Проверка актуальности.

Состояние:
Source-пакет dictd: Sisyphus и p11 — 1.13.3-alt1, p10 — 1.12.1-alt4.1.

В исходниках 1.13.3 опция -r/--raw подключена: регистрируется флаг DBG_RAW (&quot;raw&quot;), в коде присутствуют отладочные выводы &quot;* Read&quot;, &quot;* Send&quot;, &quot;* Status&quot;. Однако по коду нельзя подтвердить, что verbose-вывод реально появляется при запросе к dictd-серверу.

Решение:
ретест «dict -r» на Sisyphus. Баг не закрывать до подтверждения.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299222</commentid>
    <comment_count>2</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2026-09-16 20:50:50 +0300</bug_when>
    <thetext>Воспроизводится на 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 &gt;r.out 2&gt;r.err
$ LC_ALL=C dict -h localhost -m -s exact hacker &gt;n.out 2&gt;n.err
$ diff n.out r.out &amp;&amp; echo IDENTICAL
IDENTICAL
$ wc -c r.err
0 r.err

То же с --debug raw. Ни одной строки &quot;* Send/* Read/* Status&quot; нет.

Причина: в 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(&quot;dictd&quot;, stderr)), а клиент dict.c не вызывает log_stream/log_file вообще, поэтому вся отладка -r/--debug молча теряется. В dict 1.8.0 PRINTF в libmaa печатал через printf, отсюда «раньше работало».

Исправление — одна строка в dict.c после maa_init(argv[0]):
    log_stream(&quot;dict&quot;, stderr);
(для stderr/stdout log.c печатает только тело сообщения, без преамбулы с датой/хостом).
Апстримного тикета в github.com/cheusov/dictd нет. Перевешиваю на сопровождающего (первый в ACL dictd).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>302923</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-10-20 19:03:12 +0300</bug_when>
    <thetext>dictd-1:1.13.3-alt2 -&gt; sisyphus:

Tue Oct 20 2026 Vitaly Lipatov &lt;lav@altlinux.ru&gt; 1:1.13.3-alt2
- dict: make -r/--raw and --debug output work (closes: #17019)
- dictd: resolve client hostname only for hostname ACL rules (closes: #35335)
- colorit: add /usr/bin/m4 requirement (closes: #52229)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>