Subject: Re: Broken PKG_PATH semantics on pkg_add
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: David Brownlee <abs@NetBSD.org>
List: tech-pkg
Date: 11/29/2004 09:00:59
 	I'm sorry I've been extremely unresponsive on this. If I do not
 	get to it in the next couple of days, please make whatever changes
 	you feel are best.


On Sat, 27 Nov 2004, YAMAMOTO Takashi wrote:

> given no answer, if no one objects, i'll revert the relevant changes.
>
> i don't think the hack is useful anyway because the same effect
> can be easily achieved by setting PKG_PATH appropriately.
>
> YAMAMOTO Takashi
>
>> david, can you answer this two years old question?
>>
>> YAMAMOTO Takashi
>>
>>> hi.
>>>
>>> i want to fix this problem,
>>> but i can't because i'm not so sure what you want...
>>>
>>> if you do:
>>> PKG_PATH=/aa;/bb pkg_add cc/dd.tgz
>>>
>>> currently (after your change),
>>> package "dd.tgz" will be searched in following order:
>>> 1. ./cc/cc/dd.tgz  <= i can't believe this is what you want!
>>> 2. /aa/cc/dd.tgz
>>> 3. /bb/cc/dd.tgz
>>>
>>> can you please explain what search path(s) you expect in this case?
>>> thanks.
>>>
>>> YAMAMOTO Takashi
>>>
>>>> From: David Brownlee <abs@netbsd.org>
>>>> Date: Thu, 29 Aug 2002 22:46:52 +0100 (BST)
>>>>>> 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_new_entry() calls getcwd() in that case so it still gets
>>>>> 	an absolute path.
>>>>
>>>> in the case, lp_name points to "somddir/pkg" and
>>>> searched in "/absolute_path_of/somedir".
>>>> so "/absolute_path_of/somedir/somedir/pkg" will be found
>>>> while maybe you want "/absolute_path_of/somedir/pkg".
>

-- 
 		David/absolute       -- www.NetBSD.org: No hype required --