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

Bug#555620: install-info: ginstall-info produces somehow broken utf-8 output



Norbert Preining <preining@logic.at> writes:

> Ok, the problem is really with the two strangely garbled entries.
>
> When you remove the Ada mode and maplev entries the info file is
> suddenly recognized as utf8 and everything works.
>
> Hmmm, that is strange. Calling
> 	ginstall-info /usr/share/info/emacs-23/ada-mode.gz ./dir
> adds a proper entry.
>
> Can it be that the dir file was somehow hosed?
>
> Can you run (as root)
> 	mv /usr/share/info/dir /usr/share/info/dir.saved
> 	update-info-dir 
> and check whether the created dir file is again broken?

it is:

kallisto:/usr/share/info# mv dir /tmp/dir.saved
kallisto:/usr/share/info# update-info-dir 
install-info: Warnung: Kein Info-Verzeichnis-Eintrag in
„/usr/share/info/mime-ja.info.gz“
install-info: Warnung: Kein Info-Verzeichnis-Eintrag in
„/usr/share/info/mime-en.info.gz“
kallisto:/usr/share/info# diff -u <(xxd -c 12 dir) <(xxd -c 12 \
                          /tmp/dir.saved)
--- /dev/fd/63  2009-11-11 19:17:57.696840714 +0100
+++ /dev/fd/62  2009-11-11 19:17:57.696840714 +0100
@@ -897,7 +897,7 @@
 0002a00: 7a69 7020 636f 6d6d 616e 6420  zip command 
 0002a0c: 666f 7220 636f 6d70 7265 7373  for compress
 0002a18: 696e 6720 6669 6c65 732e 0aa0  ing files...
-0002a24: b722 012a 2041 6461 206d 6f64  .".* Ada mod
+0002a24: a734 012a 2041 6461 206d 6f64  .4.* Ada mod
 0002a30: 653a 2028 656d 6163 732d 3233  e: (emacs-23
 0002a3c: 2f61 6461 2d6d 6f64 6529 2e0a  /ada-mode)..
 0002a48: 2020 2020 2020 2020 2020 2020              
@@ -1275,7 +1275,7 @@
 0003bb8: 2e20 2020 2020 2020 2020 2020  .           
 0003bc4: 2020 456d 6163 7320 6d61 6a6f    Emacs majo
 0003bd0: 7220 6d6f 6465 2066 6f72 204d  r mode for M
-0003bdc: 6170 6c65 2056 0aa0 b722 010a  aple V..."..
+0003bdc: 6170 6c65 2056 0aa0 a734 010a  aple V...4..
 0003be8: 4765 6e65 7261 6c20 436f 6d6d  General Comm
 0003bf4: 616e 6473 0a2a 2053 6372 6565  ands.* Scree
 0003c00: 6e3a 2028 7363 7265 656e 292e  n: (screen).
kallisto:/usr/share/info# rm dir
kallisto:/usr/share/info# update-info-dir 
install-info: Warnung: Kein Info-Verzeichnis-Eintrag in
„/usr/share/info/mime-ja.info.gz“
install-info: Warnung: Kein Info-Verzeichnis-Eintrag in
„/usr/share/info/mime-en.info.gz“
kallisto:/usr/share/info# diff -u <(xxd -c 12 dir) <(xxd -c 12 \
                          /tmp/dir.saved)
--- /dev/fd/63  2009-11-11 19:18:33.264839935 +0100
+++ /dev/fd/62  2009-11-11 19:18:33.264839935 +0100
@@ -897,7 +897,7 @@
 0002a00: 7a69 7020 636f 6d6d 616e 6420  zip command 
 0002a0c: 666f 7220 636f 6d70 7265 7373  for compress
 0002a18: 696e 6720 6669 6c65 732e 0aa0  ing files...
-0002a24: 5772 012a 2041 6461 206d 6f64  Wr.* Ada mod
+0002a24: a734 012a 2041 6461 206d 6f64  .4.* Ada mod
 0002a30: 653a 2028 656d 6163 732d 3233  e: (emacs-23
 0002a3c: 2f61 6461 2d6d 6f64 6529 2e0a  /ada-mode)..
 0002a48: 2020 2020 2020 2020 2020 2020              
@@ -1275,7 +1275,7 @@
 0003bb8: 2e20 2020 2020 2020 2020 2020  .           
 0003bc4: 2020 456d 6163 7320 6d61 6a6f    Emacs majo
 0003bd0: 7220 6d6f 6465 2066 6f72 204d  r mode for M
-0003bdc: 6170 6c65 2056 0aa0 5772 010a  aple V..Wr..
+0003bdc: 6170 6c65 2056 0aa0 a734 010a  aple V...4..
 0003be8: 4765 6e65 7261 6c20 436f 6d6d  General Comm
 0003bf4: 616e 6473 0a2a 2053 6372 6565  ands.* Scree
 0003c00: 6e3a 2028 7363 7265 656e 292e  n: (screen).

Note that the second run produces different results. In fact each run
produces different results. (the length of the garbage sometimes
differs, too).

> And if yes, can you send me *your* copy of ada-mode.gz from the info 
> directory/emacs-23?

kallisto:/usr/share/info# debsums -s emacs23-common-non-dfsg && echo ok
ok
kallisto:/usr/share/info# md5sum emacs-23/ada-mode.gz 
f2c2477b0c646ca285b1d38acd5b6d7e  emacs-23/ada-mode.gz

file is attached

I played arround following your route above (hacked your script to
doing
      echo "processed $file:"
      sed 's,\x1f,X,g' < "$ODIR/dir"|file -
after each processed file)

...
processed /usr/share/info/screen.info.gz:
/dev/stdin: UTF-8 Unicode English text
processed /usr/share/info/maplev.gz:
/dev/stdin: data
...

=> probably maplev is the bad one.
karme@kallisto:/tmp$ dlocate /usr/share/info/maplev.gz
emacs-goodies-el: /usr/share/info/maplev.gz
karme@kallisto:/tmp$ debsums -s emacs-goodies-el
karme@kallisto:/tmp$ md5sum /usr/share/info/maplev.gz
98717e7b29692eb90ed810dfc26407d3  /usr/share/info/maplev.gz

Some further tests ...
For me this looks like some memory corruption in ginstall-info. I can
only successfully reproduce it using a quite filled dir as base. Running
ginstall-info under valgrind the output file looks ok.

Attached a base dir file
(dir.ok, md5: e72d028e3fa665a9368b88b07f094864)

I then do:
$ cp dir.ok dir
$ ginstall-info /usr/share/info/maplev.gz dir
now the dir file broken.

Greetings
jens

Attachment: ada-mode.gz
Description: Binary data

Attachment: maplev.gz
Description: Binary data

Attachment: dir.ok
Description: Binary data


Reply to: