Subject: Re: pkg_{create,add} and TAR vs TAR_FULLPATHNAME
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 09/26/2001 09:19:16
On Wed, 26 Sep 2001, Hubert Feyrer wrote:
> On Tue, 25 Sep 2001, Stoned Elipot wrote:
>
> > could someone explain to me why in pkg_create a full pathname
> > is used to exec tar command and not in pkg_add ?
>
> Historical reason that noone bothered to fix? Send patch! :)

Good guess, buy why guess when you can look it up?

Stoned, times up. It was a trick question anyway -- you can't get all
the information out of NetBSD's anoncvs...

It looks like agc just changed all occurences of /usr/bin/tar to
TAR_FULLPATHNAME and tar to TAR_CMD in March, 1999. The full pathname
was actually introduced in create/perform.c with v1.26 in FreeBSD
land, by "jkh", with this commit message:

 Re-work make_dist() routine to build the tar command more reasonably.
 This should eliminate the problem with truncated packages.

<http://www.FreeBSD.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/create/perform.c
?rev=1.26&content-type=text/x-cvsweb-markup>

This replaced a more devious and involved way of constructing the
command. It looks as if jkh just used a full path while he was in
there -- best current practice -- but no thought was ever given to
making sweeping changes to the other invocations of "tar", since they
weren't having any problems with them.

Frederick