Subject: Re: PATCH: pkgviews and wrappers
To: Julio M. Merino Vidal <jmmv@menta.net>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 07/27/2004 00:21:44
--Signature=_Tue__27_Jul_2004_00_21_45_-0500_opHiS_HqkxlKn7xs
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 bsd.pkg.mk 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:
> 
> WRAPPER_VARDIRS=	PKG_CONFIG_PATH:lib/pkgconfig
> 
> 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

--Signature=_Tue__27_Jul_2004_00_21_45_-0500_opHiS_HqkxlKn7xs
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iQEVAwUBQQXmafQsKR/Zi7L+AQKJ8wf9HR9jp+hWMtJ486eYjLhDsN2VidiyTODO
XKcidPKASPG9w6xUwslTpyC9ijj9pBAWMChXQYgJfvx/JFfS5Ky2pHXZ50rVMAwP
QhobvUZoubKc45k7ItJXwsjrt1l+2bh9FBqWunXDbEQkeNExK7+20O/ZwJvGaFat
WXukkkCRYqAGeccy9KidI0nnF2nJTuhyqzqVwoHp8xJBu8hc9/BWT+LnNttb5cdq
p/tUqj77R0kIr5fETkOojr+WCOCVkg9aHulorD2f+SKg5p7Z+qO+smbZcOsG4ntW
oadrNa1ocJk/IHrp14wL73HRSbAZPTedACHKE8xjYMXkp9GPUkGzhw==
=AUFT
-----END PGP SIGNATURE-----

--Signature=_Tue__27_Jul_2004_00_21_45_-0500_opHiS_HqkxlKn7xs--