Subject: pkg/6406: pkg_delete breaks with X11R6 info files
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mcmahill@mtl.mit.edu>
List: netbsd-bugs
Date: 11/06/1998 23:13:55
>Number:         6406
>Category:       pkg
>Synopsis:       pkg_delete doesn't handle X11R6 info files
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov  6 20:20:00 1998
>Last-Modified:
>Originator:     Dan McMahill
>Organization:

>Release:        NetBSD-1.3,  pkg_install-1998091 <NetBSD-current source date>
>Environment:
	
System: NetBSD dinah-moe 1.3 NetBSD 1.3 (DINAH-MOE) #0: Tue Jan 13 02:02:40 EST 1998 dan@dinah-moe.mit.edu:/zip/NetBSD/source/usr/src/sys/arch/mac68k/compile/DINAH-MOE mac68k


>Description:

when a pkg Makefile has
USE_X11=	yes

INFO_FILES=	info_file.info

and the package installs info files, the info file is listed in PLIST as:
@unexec %D/bin/install-info --delete %D/info/info_file.info  %D/info/dir 
info/info_file.info
@exec %D/bin/install-info %D/info/info_file.info  %D/info/dir

'make install' works and correctly uses
/usr/pkg/bin/install-info
however, 'make deinstall' tries to use
/usr/X11R6/bin/install-info

	
>How-To-Repeat:

make a package with
USE_X11=        yes
        
INFO_FILES=     info_file.info

in the Makefile and

@unexec %D/bin/install-info --delete %D/info/info_file.info  %D/info/dir
info/info_file.info
@exec %D/bin/install-info %D/info/info_file.info  %D/info/dir

in pkg/PLIST,
then 'make install' and then 'make deinstall'


   
>Fix:

possible work arounds:

put
@unexec install-info --delete %D/info/info_file.info  %D/info/dir
info/info_file.info
@exec install-info %D/info/info_file.info  %D/info/dir
in pkg/PLIST.  This requires that install-info be in roots path.

could hard code /usr/pkg/bin/ as the path in PLIST, but this breaks if
someone doesn't have install-info in /usr/pkg/bin.

maybe there's a way at install time to find out where 'install-info' lives and put the
full path into /var/db/pkg/pkgname/+CONTENTS?  

	
>Audit-Trail:
>Unformatted: