Package: debhelper
Version: 9.20120909
Severity:minor
dh_installman uses command "man --version" to detect whether it is the right man
to use the --recode options later [1].
Since man-db is the man of Debian it is ok. But frankly speaking, this
code is wrong.
defined `foo` returns false *only* if foo cannot be executed at all.
Otherwise it returns true, even if foo returns non-zero code and
nothing to stdout:
# perl -e 'print ">>" . (defined `foo`) . "<<\n"'
>><<
# perl -e 'print ">>" . (defined `true`) . "<<\n"'
>>1<<
# perl -e 'print ">>" . (defined `false`) . "<<\n"'
>>1<<
Proposed patch:
- if (defined `man --version`) {
+ if (0 == system('man --version >/dev/null 2>/dev/null')) {
[1]
http://anonscm.debian.org/gitweb/?p=debhelper/debhelper.git;a=blob;f=dh_installman;h=52d1e6b11541c7e5c7d3150b8911eca5b2eed521;hb=HEAD#l202
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]