From amdmi3@mail.ru  Sun Jan 15 17:18:57 2006
Return-Path: <amdmi3@mail.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 39D8F16A420
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Jan 2006 17:18:57 +0000 (GMT)
	(envelope-from amdmi3@mail.ru)
Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 959C543D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Jan 2006 17:18:56 +0000 (GMT)
	(envelope-from amdmi3@mail.ru)
Received: from [213.148.29.33] (port=25906 helo=nexii.panopticon)
	by mx3.mail.ru with esmtp 
	id 1EyBWp-000IR4-00
	for FreeBSD-gnats-submit@freebsd.org; Sun, 15 Jan 2006 20:18:55 +0300
Received: from hades.panopticon (hades.panopticon [192.168.0.2])
	by nexii.panopticon (Postfix) with ESMTP id 7077C1140E
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Jan 2006 20:21:49 +0300 (MSK)
Received: by hades.panopticon (Postfix, from userid 1000)
	id 4449D5A; Sun, 15 Jan 2006 20:23:04 +0300 (MSK)
Message-Id: <20060115172304.4449D5A@hades.panopticon>
Date: Sun, 15 Jan 2006 20:23:04 +0300 (MSK)
From: Dmitry Marakasov <amdmi3@mail.ru>
Reply-To: Dmitry Marakasov <amdmi3@mail.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Cleaner use of INSTALLS_OMF with no scrollkeeper installed
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         91834
>Category:       ports
>Synopsis:       [PATCH] Cleaner use of INSTALLS_OMF with no scrollkeeper installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 15 17:20:03 GMT 2006
>Closed-Date:    Sun Jan 15 20:28:56 GMT 2006
>Last-Modified:  Sun Jan 15 20:28:56 GMT 2006
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 6.0-RELEASE FreeBSD 6.0-RELEASE #1: Sun Dec 18 08:07:07 MSK 2005 amdmi3@hades.panopticon:/usr/obj/usr/src/sys/HADES i386

>Description:
Some ports install .omf (opensource metadata framework) files, which are intended for use with scrollkeeper (ports/textproc/scrollkeeper).

As these files need to be registered with scrollkeper, there's knob INSTALLS_OMF, which, if set, makes bsd.gnome.mk automatically add @exec/@unexec directives to ports' plist. These do scrollkeeper-install/scrollkeeper-uninstall calls on package installation/deinstallation.

But when scrollkeeper is not installed on a system, errors will appear: `scrollkeeper-install: not found' `scrollkeeper-uninstall: not found' on installation/deinstallation of a package because nonexisting binaries are being called. These errors are harmless, as scrollkeeper calls are done as `scrollkeeper-(un)install || true', but still annoying/confusing.

That is, of course, bad idea to add dependency on scrollkeeper to ports that just INSTALLS_OMF, so I recommend to modify bsd.gnome.mk a little, so before calling scrollkeeper-(un)install it will be checked for existence with `which -s'.

!!! Also, I've just found out that when installing software from port, scrollkeeper-install doesn't get called at all (as @exec is only called when installing prom package). I have no fix for that yet.

>How-To-Repeat:

>Fix:

--- bsd.gnome.mk.patch begins here ---
--- bsd.gnome.mk.orig	Tue Jan 10 18:23:54 2006
+++ bsd.gnome.mk	Sun Jan 15 19:34:37 2006
@@ -730,9 +730,9 @@
 
 .  if defined(INSTALLS_OMF)
 	@for i in `${GREP} "\.omf$$" ${TMPPLIST}`; do \
-		${ECHO_CMD} "@exec scrollkeeper-install -q %D/$${i} 2>/dev/null || /usr/bin/true" \
+		${ECHO_CMD} "@exec which -s scrollkeeper-install && scrollkeeper-install -q %D/$${i} 2>/dev/null || /usr/bin/true" \
 			>> ${TMPPLIST}; \
-		${ECHO_CMD} "@unexec scrollkeeper-uninstall -q %D/$${i} 2>/dev/null || /usr/bin/true" \
+		${ECHO_CMD} "@unexec which -s scrollkeeper-uninstall && scrollkeeper-uninstall -q %D/$${i} 2>/dev/null || /usr/bin/true" \
 			>> ${TMPPLIST}; \
 	done
 .  endif
--- bsd.gnome.mk.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: az 
Responsible-Changed-When: Sun Jan 15 20:06:40 UTC 2006 
Responsible-Changed-Why:  
Assign to bsd.gnome.mk maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91834 
State-Changed-From-To: open->closed 
State-Changed-By: jylefort 
State-Changed-When: Sun Jan 15 20:21:09 UTC 2006 
State-Changed-Why:  
Ports which install .omf files should depend on scrollkeeper, so that their 
documentation shows up in the GNOME help browser. If you found ports 
which install .omf files without depending on scrollkeeper, please alert 
the maintainers of these ports. 

When installing software from ports, scrollkeeper-install is usually called 
from the vendor's Makefile. When it is not, a scrollkeeper-install 
invocation must be added to post-install. 

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