[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#916125: hunspell: "hunspell -D" does not print loaded dictionary



Package: hunspell
Version: 1.7.0-2
Severity: normal
Tags: patch upstream

Dear Maintainer,

Commit 27829f0 which pplies to version 1.7.0 makes "hunspell -D" without files quit early.
Too early to print the loaded dictionary, making "hunspell -D" not perform as expexted, and
breaking eacs flyspell.

Reverting the commit, or moving the leave logic a little later, solves this.

cheers,
Itaï.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (600, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-3-amd64 (SMP w/12 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hunspell depends on:
ii  hunspell-en-gb [hunspell-dictionary]         1:6.1.3-1
ii  hunspell-es [hunspell-dictionary]            1:6.1.3-1
ii  hunspell-fr-classical [hunspell-dictionary]  1:6.3-1
ii  hunspell-he [hunspell-dictionary]            1:6.1.3-1
ii  libc6                                        2.28-2
ii  libgcc1                                      1:8.2.0-12
ii  libhunspell-1.7-0                            1.7.0-2
ii  libncursesw6                                 6.1+20181013-1
ii  libreadline7                                 7.0-5
ii  libstdc++6                                   8.2.0-12
ii  libtinfo6                                    6.1+20181013-1

hunspell recommends no packages.

Versions of packages hunspell suggests:
ii  unzip  6.0-21

-- no debconf information
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 hunspell (1.7.0-2.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Exit little less early on -D with no file args
Author: Itaï BEN YAACOV <candeb@free.fr>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-12-10

--- hunspell-1.7.0.orig/src/tools/hunspell.cxx
+++ hunspell-1.7.0/src/tools/hunspell.cxx
@@ -2066,9 +2066,6 @@ int main(int argc, char** argv) {
         gettext(
             "AVAILABLE DICTIONARIES (path is not mandatory for -d option):\n"));
     search(path, NULL, NULL);
-    if (-1 == arg_files) {
-      exit(0);
-    }
   }
 
   if (!privdicname)
@@ -2116,6 +2113,10 @@ int main(int argc, char** argv) {
     exit(1);
   }
 
+  if (showpath && -1 == arg_files) {
+    exit(0);
+  }
+
   /* open the private dictionaries */
   if (HOME) {
     buf.assign(HOME);

Reply to: