Subject: pkg/13179: mail/faces installs app-defaults file in possibly non-existent directory
To: None <gnats-bugs@gnats.netbsd.org>
From: None <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 06/12/2001 17:32:04
>Number:         13179
>Category:       pkg
>Synopsis:       mail/faces installs app-defaults file in possibly non-existent directory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 12 15:30:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     John Darrow
>Release:        NetBSD/i386 1.5.1_BETA2 20010602; pkgsrc 20010607
>Organization:
Computing Services, Wheaton College, Wheaton, IL
>Environment:
NetBSD rebekah.wheaton.edu 1.5.1_BETA2 NetBSD 1.5.1_BETA2 (REBEKAH) #0: Thu Jun  7 06:19:18 CDT 2001     jdarrow@michal.wheaton.edu:/var/src/sys/arch/i386/compile/REBEKAH i386


>Description:
(This is the first in a series of package pr's stemming from my 20010607
bulk build with xpkgwedge)

The mail/faces package attempts to install an app-defaults file into
$X11PREFIX/lib/X11/app-defaults, even though it is not a USE_X11BASE
package.

Said directory is created by the mk/NetBSD.x11.dist mtree file only
when the first USE_{IMAKE,MOTIF,X11BASE} package is built.

If mail/faces is built with xpkgwedge before any packages using one of
the above are built (as was the ordering in my bulk build), the
directory does not yet exist, and thus the attempted install fails:

[...]
install -c -o bin -m 755 mkfacesindex /usr/pkg/bin
install -c -o bin -m 755 newscheck.faces /usr/pkg/bin
install -c -o bin -m 755 newsfrom.faces /usr/pkg/bin
install -c -s -m 751 faces /usr/pkg/bin
install -c -m 755 face_update /usr/pkg/bin
install -c -m 755 faces.sendmail /usr/pkg/bin
install -c -m 644 faces.man  /usr/pkg/man/man1/faces.1
install -c -m 444 face_update.1  /usr/pkg/man/man1/face_update.1
install -c -m 444 -o bin Faces.ad /usr/pkg/lib/X11/app-defaults/Faces
install: /usr/pkg/lib/X11/app-defaults/Faces: No such file or directory
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
BULK> faces-1.6.1 was marked as broken:
-rw-r--r--  1 root  wheel  7863 Jun  7 13:54 .broken


>How-To-Repeat:
make package in mail/faces on a clean system, or a normal bulk build
	
>Fix:
Three workarounds, all somewhat ugly... I'll let the package gurus
decide what to do...

 1. Always make sure a USE_{IMAKE,MOTIF,X11BASE} package is installed
first.

 2. Make mail/faces USE_X11BASE.

 3. Explicitly INSTALL_DATA_DIR in a pre-install script/target

(Note that the faces install also does some other ugly stuff, like
explicitly using owner bin instead of BINOWN, etc...)
>Release-Note:
>Audit-Trail:
>Unformatted: