Subject: Re: pkg_add problem
To: Hubert Feyrer <hubert.feyrer@rrzc1.rz.uni-regensburg.de>
From: S.J. Borrill <sjb42@cus.cam.ac.uk>
List: tech-userlevel
Date: 06/12/1998 16:52:51
On Fri, 12 Jun 1998, Hubert Feyrer wrote:

> 
> [This thing is more related to tech-userlevel, please forward upcoming 
> replies there. Also for the context a most-fully quote of the original 
> mail.]

<original mail follows>

>From sjb42@cus.cam.ac.uk Fri Jun 12 16:11:11 1998
Date: Fri, 12 Jun 1998 15:18:09 +0100 (BST)
From: "S.J. Borrill" <sjb42@cus.cam.ac.uk>
To: port-arm32@netbsd.org
Subject: Re: pkg_add problem 

On Fri, 12 Jun 1998, Perry E. Metzger wrote:

> "S.J. Borrill" writes:
> > I'm finding that pkg_add is not storing the installation information in
> > /var/db/pkg/<package name>. I'm using the UVM userland and a UVM current
> > kernel. This failure mean that pkg_info and pkg_delete don't work, but
> > also means that any packages which have dependencies don't work properly.
> > 
> > Anyone else seen this problem?
> 
> I've not had this difficulty. Perhaps you are running the pkg tools as 
> non-root and have a permissions problem or some such?

Nope, running as root. I've even tried setting PKG_DBDIR and PKG_PREFIX
appropriately. However, further investigation shows that it's only failing
on X packages that it's trying to install in /usr/X11R6 which on my system
is a symbolic link to /usr/X11R6.3 (as is /usr/X11R6.1). 

The reason it's not entering anything in /var/db/pkg is that it is not
actually installing anything, so my original explanation was wrong.

By removing X11R6 as a symbolic link and creating /usr/X11R6 as an empty
directory allowed the package to be installed. Therefore the problem is
actually that pkg_add won't follow symbolic links which I can't see being
alluded to in the man pages.

I got around this by using the -p option to pkg_add.

Stephen


<end mail>
 
> This sounds really strange, as on some of my systems (though no arm32), 
> /usr/X11R6 is also a symlink, which works just fine.
> 
> Can you send us more details on how you traced this down? ktrace, ...?

I just tried it empirically. Compiling a new pkg_add from -current doesn't
help, either.

Stephen Borrill