NetBSD Problem Report #47958
From www@NetBSD.org Mon Jun 24 09:53:08 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6D18870A4F
for <gnats-bugs@gnats.NetBSD.org>; Mon, 24 Jun 2013 09:53:08 +0000 (UTC)
Message-Id: <20130624095306.6DFAF70A6A@mollari.NetBSD.org>
Date: Mon, 24 Jun 2013 09:53:06 +0000 (UTC)
From: rjkovacic@gmail.com
Reply-To: rjkovacic@gmail.com
To: gnats-bugs@NetBSD.org
Subject: makewhatis.c not generating entries in whatisdb for some pages
X-Send-Pr-Version: www-1.0
>Number: 47958
>Category: misc
>Synopsis: makewhatis.c not generating entries in whatisdb for some pages
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 24 09:55:00 +0000 2013
>Last-Modified: Mon Jun 24 17:10:00 +0000 2013
>Originator: Robert Kovacic
>Release: current (via minix3)
>Organization:
None
>Environment:
Minix 3.2.1 (which uses makewhatis.c, v 1.47 2009/04/02 21:39:33 apb from NetBSD)
>Description:
makewhatis in the above version of Minix does not create an entry in whatisdb for some man pages. Therefore even though these man pages exist, they will not appear if you use apropos to search for them. It seems that GNU man pages "generated by Pod" are the main culprits. The following changes to makewhatis.c fixed the problem for me:
880a881,897
>
> /* Skip over lines in man pages that have been generated
> * by Pod. This makewhatis cannot deal with it (and as
> * a result the man page would not appear in whatis.db)
> * Modified by Robert Kovacic, June 23 2013.
> */
> if (strncasecmp(buffer,
> ".\\\" Automatically generated by Pod", 34) == 0) {
> do {
> if (GetS(in, buffer, sizeof(buffer) - 1)
> == NULL) {
> free(section);
> return NULL;
> }
> } while (strncasecmp(buffer, ".IX TITLE", 9) != 0);
> }
>
>How-To-Repeat:
Run makewhatis with GNU man pages "generated by Pod" (e.g. clang.1) - an entry will NOT be generated in the whatisdb.
>Fix:
diff result:
880a881,897
>
> /* Skip over lines in man pages that have been generated
> * by Pod. This makewhatis cannot deal with it (and as
> * a result the man page would not appear in whatis.db)
> * Modified by Robert Kovacic, June 23 2013.
> */
> if (strncasecmp(buffer,
> ".\\\" Automatically generated by Pod", 34) == 0) {
> do {
> if (GetS(in, buffer, sizeof(buffer) - 1)
> == NULL) {
> free(section);
> return NULL;
> }
> } while (strncasecmp(buffer, ".IX TITLE", 9) != 0);
> }
>
>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb for some pages
Date: Mon, 24 Jun 2013 08:02:46 -0400
On Jun 24, 9:55am, rjkovacic@gmail.com (rjkovacic@gmail.com) wrote:
-- Subject: misc/47958: makewhatis.c not generating entries in whatisdb for s
| makewhatis in the above version of Minix does not create an entry in whatisdb for some man pages. Therefore even though these man pages exist, they will not appear if you use apropos to search for them. It seems that GNU man pages "generated by Pod" are the main culprits. The following changes to makewhatis.c fixed the problem for me:
Can you please send a uni diff (diff -u).
Thanks,
christos
From: Robert Kovacic <rjkovacic@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb for
some pages
Date: Mon, 24 Jun 2013 22:35:55 +1000
--089e011832ea65b55804dfe5a7dc
Content-Type: multipart/alternative; boundary=089e011832ea65b55504dfe5a7da
--089e011832ea65b55504dfe5a7da
Content-Type: text/plain; charset=ISO-8859-1
Attached as requested.
On 24 June 2013 22:05, Christos Zoulas <christos@zoulas.com> wrote:
> The following reply was made to PR misc/47958; it has been noted by GNATS.
>
> From: christos@zoulas.com (Christos Zoulas)
> To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org,
> gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
> Cc:
> Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb
> for some pages
> Date: Mon, 24 Jun 2013 08:02:46 -0400
>
> On Jun 24, 9:55am, rjkovacic@gmail.com (rjkovacic@gmail.com) wrote:
> -- Subject: misc/47958: makewhatis.c not generating entries in whatisdb
> for s
>
> | makewhatis in the above version of Minix does not create an entry in
> whatisdb for some man pages. Therefore even though these man pages exist,
> they will not appear if you use apropos to search for them. It seems that
> GNU man pages "generated by Pod" are the main culprits. The following
> changes to makewhatis.c fixed the problem for me:
>
> Can you please send a uni diff (diff -u).
>
> Thanks,
>
> christos
>
>
--089e011832ea65b55504dfe5a7da
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Attached as requested.<br><div><div class=3D"gmail_extra">=
<br><br><div class=3D"gmail_quote">On 24 June 2013 22:05, Christos Zoulas <=
span dir=3D"ltr"><<a href=3D"mailto:christos@zoulas.com" target=3D"_blan=
k">christos@zoulas.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">The following reply was made to PR misc/4795=
8; it has been noted by GNATS.<br>
<br>
From: <a href=3D"mailto:christos@zoulas.com">christos@zoulas.com</a> (Chris=
tos Zoulas)<br>
To: gnats-bugs@NetBSD.org, <a href=3D"mailto:misc-bug-people@netbsd.org">mi=
sc-bug-people@netbsd.org</a>,<br>
=A0 =A0 =A0 =A0 <a href=3D"mailto:gnats-admin@netbsd.org">gnats-admin@netbs=
d.org</a>, <a href=3D"mailto:netbsd-bugs@netbsd.org">netbsd-bugs@netbsd.org=
</a><br>
Cc:<br>
Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb fo=
r some pages<br>
Date: Mon, 24 Jun 2013 08:02:46 -0400<br>
<br>
=A0On Jun 24, =A09:55am, <a href=3D"mailto:rjkovacic@gmail.com">rjkovacic@g=
mail.com</a> (<a href=3D"mailto:rjkovacic@gmail.com">rjkovacic@gmail.com</a=
>) wrote:<br>
=A0-- Subject: misc/47958: makewhatis.c not generating entries in whatisdb =
for s<br>
<br>
=A0| makewhatis in the above version of Minix does not create an entry in w=
hatisdb for some man pages. Therefore even though these man pages exist, th=
ey will not appear if you use apropos to search for them. It seems that GNU=
man pages "generated by Pod" are the main culprits. The followin=
g changes to makewhatis.c fixed the problem for me:<br>
<br>
=A0Can you please send a uni diff (diff -u).<br>
<br>
=A0Thanks,<br>
<br>
=A0christos<br>
<br>
</blockquote></div><br></div></div></div>
--089e011832ea65b55504dfe5a7da--
--089e011832ea65b55804dfe5a7dc
Content-Type: application/octet-stream; name="diff.list"
Content-Disposition: attachment; filename="diff.list"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hibnejpi0
LS0tIG1ha2V3aGF0aXMuYy5vcmlnCU1vbiBKdW4gMjQgMjI6Mjk6MDYgMjAxMworKysgbWFrZXdo
YXRpcy5jCVN1biBKdW4gMjMgMDk6NTk6MzMgMjAxMwpAQCAtODc4LDYgKzg3OCwyMyBAQAogCQkJ
ZnJlZShzZWN0aW9uKTsKIAkJCXJldHVybiBOVUxMOwogCQl9CisKKwkJLyogU2tpcCBvdmVyIGxp
bmVzIGluIG1hbiBwYWdlcyB0aGF0IGhhdmUgYmVlbiBnZW5lcmF0ZWQKKwkJICogYnkgUG9kLiBU
aGlzIG1ha2V3aGF0aXMgY2Fubm90IGRlYWwgd2l0aCBpdCAoYW5kIGFzCisJCSAqIGEgcmVzdWx0
IHRoZSBtYW4gcGFnZSB3b3VsZCBub3QgYXBwZWFyIGluIHdoYXRpcy5kYikKKwkJICogTW9kaWZp
ZWQgYnkgUm9iZXJ0IEtvdmFjaWMsIEp1bmUgMjMgMjAxMy4KKwkJICovCisJCWlmIChzdHJuY2Fz
ZWNtcChidWZmZXIsCisJCSAJIi5cXFwiIEF1dG9tYXRpY2FsbHkgZ2VuZXJhdGVkIGJ5IFBvZCIs
IDM0KSA9PSAwKSB7CisJCQlkbyB7CisJCQkJaWYgKEdldFMoaW4sIGJ1ZmZlciwgc2l6ZW9mKGJ1
ZmZlcikgLSAxKQorCQkJCT09IE5VTEwpIHsKKwkJCQkJZnJlZShzZWN0aW9uKTsKKwkJCQkJcmV0
dXJuIE5VTEw7CisJCQkJfQorCQkJfSB3aGlsZSAoc3RybmNhc2VjbXAoYnVmZmVyLCAiLklYIFRJ
VExFIiwgOSkgIT0gMCk7CisJCX0gCisKIAkJaWYgKG1hbnByZXByb2Nlc3MoYnVmZmVyKSkKIAkJ
CWNvbnRpbnVlOwogCQlpZiAoc3RybmNhc2VjbXAoYnVmZmVyLCAiLkR0IiwgMykgPT0gMCkgewo=
--089e011832ea65b55804dfe5a7dc--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47958 CVS commit: src/libexec/makewhatis
Date: Mon, 24 Jun 2013 08:56:22 -0400
Module Name: src
Committed By: christos
Date: Mon Jun 24 12:56:22 UTC 2013
Modified Files:
src/libexec/makewhatis: makewhatis.c
Log Message:
PR/47958: Robert Kovacic: makewhatis.c not generating entries in whatisdb
for POD generated pages
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/libexec/makewhatis/makewhatis.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, rjkovacic@gmail.com
Cc:
Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb for some pages
Date: Mon, 24 Jun 2013 08:57:21 -0400
On Jun 24, 12:40pm, rjkovacic@gmail.com (Robert Kovacic) wrote:
-- Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb f
| Attached as requested.
Applied; do pod pages work with the sqlite version of the man tools?
christos
From: Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>
To: Christos Zoulas <christos@zoulas.com>
Cc: NetBSD GNATS <gnats-bugs@netbsd.org>, misc-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, rjkovacic@gmail.com
Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb for
some pages
Date: Mon, 24 Jun 2013 19:50:54 +0530
IIRC, Most of them do, but some of them don't. It depends, if mandoc
is able to parse them.
Regards
Abhinav
On Mon, Jun 24, 2013 at 6:27 PM, Christos Zoulas <christos@zoulas.com> wrote:
> On Jun 24, 12:40pm, rjkovacic@gmail.com (Robert Kovacic) wrote:
> -- Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb f
>
> | Attached as requested.
>
> Applied; do pod pages work with the sqlite version of the man tools?
>
> christos
From: christos@zoulas.com (Christos Zoulas)
To: Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>
Cc: NetBSD GNATS <gnats-bugs@netbsd.org>, misc-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, rjkovacic@gmail.com
Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb for some pages
Date: Mon, 24 Jun 2013 13:05:01 -0400
On Jun 24, 7:50pm, er.abhinav.upadhyay@gmail.com (Abhinav Upadhyay) wrote:
-- Subject: Re: misc/47958: makewhatis.c not generating entries in whatisdb f
| IIRC, Most of them do, but some of them don't. It depends, if mandoc
| is able to parse them.
|
Right, that was the question :-) How good is mandoc in parsing them?
christos
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.