Subject: Re: gettext-lib fails to see installed libiconv
To: None <tech-pkg@netbsd.org>
From: None <blsecres@ssdtgsm.com>
List: tech-pkg
Date: 08/17/2004 10:33:26
On Mon, Aug 16, 2004 at 02:21:07PM -0400, blsecres@ssdtgsm.com wrote:
> I'm trying to install several packages that depend on gettext-lib and
> cannot get gettext-lib to build.  It fails the check for libiconv even
> though it's already installed.  Other packages that depend on just libiconv
> build and install fine.
> 
> This is a SunOS 5.7 system with PKG_INSTALLATION_PREFS=pkgviews overwrite.

I've found a workaround for this problem which could point to other issues.
It appears that _PKG_DBDIR is set to different values in bsd.prefs.mk based
on whether or not pkgviews are being used.  If pkgviews are being used,
pkg_admin is set to search DEPOTBASE for installed packages.  If pkgviews
aren't being used, PKG_DBDIR is searched for installed packages.  My
problem occurs because libiconv is not using pkgviews at the moment and
isn't in the package depot.  All packages have entries in PKG_DBDIR don't
they?  Why isn't this directory always searched?

Here's my workaround:
Index: bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.164
diff -r1.164 bsd.prefs.mk
392c392
< .if ${PKG_INSTALLATION_TYPE} == "overwrite"
---
> #.if ${PKG_INSTALLATION_TYPE} == "overwrite"
394,396c394,396
< .elif ${PKG_INSTALLATION_TYPE} == "pkgviews"
< _PKG_DBDIR=		${DEPOTBASE}
< .endif
---
> #.elif ${PKG_INSTALLATION_TYPE} == "pkgviews"
> #_PKG_DBDIR=		${DEPOTBASE}
> #.endif
-- 
Ben Secrest <blsecres@ssdtgsm.com>