pkg_install and mk/ patch for user-destdir support
Joerg Sonnenberger <joerg <at> britannica.bec.de>
2006-11-01 15:44:05 GMT
Hi all,
during the work of getting the packages I use fully user-destdir save,
I've stumpled over a bug in pkg_install. The first patch tries to fix
that, but I'd like to have another opinion as the code is quite messy
and full of side effects. The problem is that without the patch pushout
will be called with NULL when a rename failed and when any
<at> chmod/ <at> chown/ <at> chgrp is active, path names relative to PREFIX end up as
arguments for programs called with cwd /.
The second patch adds package-install, which behaves like package for
normal packages and like bin-install with forced rebuild for those
supporting DESTDIR. It is intended esp. as dependency target in
combination with bin-install.
Joerg
Index: add/extract.c
===================================================================
RCS file: /repo/netbsd/src/usr.sbin/pkg_install/add/extract.c,v
retrieving revision 1.38
diff -u -r1.38 extract.c
--- add/extract.c 11 May 2006 23:50:15 -0000 1.38
+++ add/extract.c 1 Nov 2006 00:16:11 -0000
<at> <at> -243,7 +243,8 <at> <at>
} else {
/* rename failed, try copying with a big tar command */
if (last_chdir != Directory) {
- pushout(last_chdir);
(Continue reading)