Subject: Re: Broken PKG_PATH semantics on pkg_add
To: None <>
From: YAMAMOTO Takashi <>
List: tech-pkg
Date: 08/28/2002 10:34:55
From: David Brownlee <>
Date: Tue, 27 Aug 2002 17:39:56 +0100 (BST)
> 	Updated patch attached. Its calls getcwd() for every relative
> 	path given on the command line, which may be a net win in some
> 	cases :), but otherwise feels pretty reasonable.

please don't add '.' to path blindly in the no-'/' case.
it isn't safe because PKG_PATH may not contain
current directory.

in addition, if you do pkg_add somedir/pkg (a relative path),
./somedir/somedir/pkg will be searched.
i think it isn't your intent.

path_prepend_from_pkgname and path_remove_first are
a little hackish, IMO. i think what to do is:
1. dynamically alloc a temporary pathhead instead of using
   one global PkgPath.
2. add a new temporary entry from pkgname to it.
3. then pass it to installprereq.
4. free a temporary pathhead.

YAMAMOTO Takashi <>