From andy@geek4food.org  Wed Jun 21 22:44:42 2000
Return-Path: <andy@geek4food.org>
Received: from BSDpc.geek4food.org (adsl-216-103-105-71.dsl.snfc21.pacbell.net [216.103.105.71])
	by hub.freebsd.org (Postfix) with ESMTP id 7A2A037C1BA
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Jun 2000 22:44:41 -0700 (PDT)
	(envelope-from andy@geek4food.org)
Received: from mega.geek4food.org (mega.geek4food.org [192.168.1.57])
	by BSDpc.geek4food.org (Postfix) with ESMTP id B395CAC
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Jun 2000 22:44:40 -0700 (PDT)
Received: (from andy@localhost)
	by mega.geek4food.org (8.9.3/8.9.3) id WAA99987;
	Wed, 21 Jun 2000 22:44:40 -0700 (PDT)
	(envelope-from andy@geek4food.org)
Message-Id: <200006220544.WAA99987@mega.geek4food.org>
Date: Wed, 21 Jun 2000 22:44:40 -0700 (PDT)
From: <andy@geek4food.org>
Reply-To: andy@geek4food.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: TkMan 2.14 / Glimpse interaction problem
X-Send-Pr-Version: 3.2

>Number:         19433
>Category:       ports
>Synopsis:       Glimpse 4.12 changed exit status hoses TkMan
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 21 22:50:01 PDT 2000
>Closed-Date:    Mon Jun 26 05:36:48 PDT 2000
>Last-Modified:  Mon Jun 26 05:37:08 PDT 2000
>Originator:     Andy Sparrow
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
None I can see
>Environment:

	All currently supported ports enironments, as far as I can see.

>Description:

	glimpse version 4.1 returns exit status '0' for a 'glimpse -V'
	glimpse verion 4.12 returns exit status '1' for a 'glimpse -V'

	The latter makes 'tkman' think that the command exited with
	an error, and it bombs out.

>How-To-Repeat:

	Build 'tkman' from ports, removing old 'glimpse' first if
	installed (I used 2.1b4 as this was recently commited, but
	I believe the old 'tkman' will bomb too).

	Run 'tkman'.

	After building the man page database, Tkman prints:

		ERROR executing "/usr/local/bin/glimpse -V": 
		This is glimpse version 4.12, 1999.

		child process exited abnormally

	and exits.

>Fix:

	I chose to fix 'glimpse', as, despite this excerpt from
	the man page (common to both 4.1 and 4.12.6, BTW):

		DIAGNOSTICS
			   Exit  status  is  0 if any matches are found, 1 if none, 2
			   for syntax errors or inaccessible files.

	I felt that it was 'glimpse's exit status that was borken
	(plus, hacking 'tkman' was a lot harder... ;-)

	Adding this trivial patch fragment to the FreeBSD patches
	(it would actually be patch-ac) does the trick:


diff -ru main.c.bak main.c
--- main.c.bak        Fri Jun 16 00:04:43 2000
+++ main.c      Fri Jun 16 00:04:56 2000
@@ -938,7 +938,7 @@
 
                        case 'V' :
                                printf("\nThis is glimpse version %s, %s.\n\n", GLIMPSE_VERSION, GLIMPSE_DATE);
-                               RETURNMAIN(0);
+                               RETURNMAIN(1);
 
                        default :
                                if (isdigit(c)) quitwhile = ON;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: tg 
State-Changed-When: Mon Jun 26 05:36:48 PDT 2000 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19433 
>Unformatted:
