Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 May 2012 14:20:25 GMT
From:      Oleg Ginzburg <olevole@olevole.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/167840: man(1) empty zcat argument when is used plain old manpath
Message-ID:  <201205131420.q4DEKPqe031063@red.freebsd.org>
Resent-Message-ID: <201205131430.q4DEU4Br066432@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167840
>Category:       misc
>Synopsis:       man(1) empty zcat argument when is used plain old manpath
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 13 14:30:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Oleg Ginzburg
>Release:        10-CURRENT
>Organization:
>Environment:
check on emptiness and support of catpages of a variable is necessary if it is
>Description:
if plain text man file are used, path to file stored in $catpage variables and $manpage remains empty. It breaks man_check_for_so from man(1) utility which tries to execute the "zcat -f" which will expect stdin. Check on emptiness and support for $catpage variable is necessary if this set.
>How-To-Repeat:
/usr/ports/archivers/rar ports, for example, used old style man:

% make -C /usr/ports/archivers/rar install
% rehash
% whereis rar
% man rar

it will hang to ctrl+d/ctrl+c 
>Fix:


Patch attached with submission follows:

--- usr.bin/man/man.sh-orig	2012-05-13 17:53:13.000000000 +0400
+++ usr.bin/man/man.sh	2012-05-13 17:53:49.000000000 +0400
@@ -255,6 +255,8 @@
 	local IFS line tstr
 
 	unset IFS
+        [ -z "${manpage}" -a -z "${catpage}" ] && return 0
+        [ -z "${manpage}" -a -n "${catpage}" ] && manpage=${catpage}
 
 	# We need to loop to accommodate multiple .so directives.
 	while true


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205131420.q4DEKPqe031063>