Subject: Re: PATCH: pkgviews and wrappers
To: Julio M. Merino Vidal <>
From: Min Sik Kim <>
List: tech-pkg
Date: 07/27/2004 00:21:44
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

* Julio M. Merino Vidal, Thu, 8 Jul 2004 21:05:39 +0200:
> Hi all,
> after some positive answers to my previous mail, I've patched pkg_install
> to create wrappers for binaries instead of links.  I've tested it with
> multiple packages with successful results :-)  A patch for pkg_install
> is attached as patch.diff, and another one for as patch2.diff.
> Package Makefiles can set the PLIST_EXEC_FILES variable to specify
> expressions to match executable files.  The default is bin/* and sbin/*,
> but there are packages that may install binaries outside these locations
> (like libexec).  These should be overriden by wrappers as well, so this
> is why the variable exists.

Sorry for late reply.  I was away from my development machine for the
last two weeks.

I think the patches look good.  Thanks for working on this!

> I've also taken minskim@'s suggestion and added another variable that can
> be set in package Makefiles, named WRAPPER_VARDIRS.  For example, pkgconfig
> will do, from its Makefile:
> and the generated wrapper will take care to set PKG_CONFIG_PATH properly,
> WRT the view where it's located.

Some commands such as aclocal have an option, instead of an env var,
to specify directories.  How about adding another variable
(WRAPPER_OPTIONS, for example) and letting it supersede
WRAPPER_VARDIRS if it is defined?

> Even though, I've had to do an ugly hack: the addition of the '-i'
> flag to pkg_delete to skip checksums when removing a package from a view
> (it worked before because it verified the symlinks, but now fails because
> it verifies the wrappers).  Any better ideas to handle this situation?

We also had to add a hack to deal with symlinks
(pkg_install/lib/plist.c, r1.44).  Maybe we should re-generate
+CONTENTS for views rather than copy from the depot?

Min Sik Kim

Content-Type: application/pgp-signature

Version: GnuPG v1.2.4 (NetBSD)