Subject: Re: RFC: Handle shared dirs in pkgviews
To: Min Sik Kim <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 07/07/2004 21:04:25
On Wed, 7 Jul 2004 13:35:28 -0500
Min Sik Kim <> wrote:

> * Julio M. Merino Vidal, Wed, 7 Jul 2004 17:44:08 +0200:
> > [snip]
> > 
> > The last solution, the one I'm proposing, is the following: make each
> > package install itself in its own depot directory.  But, for packages
> > that search for files in shared directories (pkgconfig, in this example),
> > add a patch that changes the path where files are searched.  Instead of
> > hardcoding the path value in the binary, the program should check the
> > value of an env variable (PKG_VIEWBASE) and look for files there.
> > I.e., pkgconfig could use ${PKG_VIEWBASE}/lib/pkgconfig to search its
> > files.  (We'd make it fallback to the default view if the variable is
> > unset).
> I vote for this solution, but have a minor concern.  Many packages
> already have such an env variable (e.g. PKG_CONFIG_PATH of pkgconfig).
> Then wouldn't it be better to use it, instead of adding a patch to
> teach PKG_VIEWBASE, especially when we create wrapper scripts to hide

Yeah, that's also possible and easy to do; just add a variable in the
Makefile that specifies which env var is to be set by the wrapper.  Anyway,
if we use the same variable everywhere, a user can set it in the environment
and run the binaries directly, if he wants, instead of having to set many
different variables.  (Dunno why could this be needed, but I'm sure someone
can find a reason ;)


Julio M. Merino Vidal <>
The NetBSD Project -