[Pkg-zsh-devel] Bug#737582: (no subject)

Martin Vath martin at mvath.de
Thu Feb 6 09:04:33 UTC 2014


Hi,

I have only some older Debian system at my current institute as a user,
but I cannot reproduce the bug here:

I copied Util/helpfiles to a temporary directory and called
within that directory:

gunzip -c /usr/share/man/man1/zshbuiltins.1.gz | \
   perl helpfiles /dev/stdin 1

Then the subdirectory 1 contains the (correct) helpfiles.
(BTW, it is not a good idea to pass /dev/stdin to the script,
since if "man /dev/stdin" fails, the script will retry with
"nroff -man /dev/stdin", and this will of course not "reset"
the /dev/stdin data - it would be cleaner to use instead the file:
   perl $(CURDIR)/Util/helpfiles FILE_WHICH_IS_FEEDED_TO_DEV_STDIN
     debian/zsh-common/usr/share/zsh/help
However, if "man" works this should not be related with the bug.)

You can easily reproduce manually what the script does:

1.
unset all environment variables starting with LC_, LESS, or MAN.
In bash you can emulate this with
unset ${!LC_*} ${!LESS*} ${!MAN*}

2.
export LANG=C MANWIDTH=80 GROFF_NO_SGR=

3.
gunzip -c /usr/share/man/man1/zshbuiltins.1.gz | \
     man /dev/stdin >tempfile1
(resp. replace /dev/stdin by the path to the manpage)
If this should return a nonzero exit status, the "man ..."
is replaced by "nroff -man ..." and retried
(This is the step which can break if you use /dev/stdin.)

4.
colcrt tmpfile1 >tmpfile2

(I see that here is a bug: This should be colcrt - tmpfile1 >tmpfile2
However, this is produces only "more ugly" output and is probably
not related to this bug here.)

After this, tmpfile2 is splitted to helpfiles as previously -
hard to believe that the cutting of lines should occur in this code.
Probably tmpfile2 is already broken.

I suppose that some environment variable is set which makes already
step 3 produce a "bad" file, but I have no idea which variable this
might be.



More information about the Pkg-zsh-devel mailing list