[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Prepending parent values in Configuration::FindFile



On 23 January 2012 21:09, David Kalnischkies
<kalnischkies+debian@gmail.com> wrote:
> Hello again, too :)
>
> On Sun, Jan 22, 2012 at 08:45, Daniel Hartwig <mandyke@gmail.com> wrote:
>> Is there some reason why FindFile stops prepending parent values at
>> the first parent with an empty value?
>
> That's a good question. I don't see a real reason for it beside that
> it is this way since 2001 - before there was no parent-walk.
> I will ask Michael then he is back,

Appreciate it.  While it does seem like an oversight (and I have not
found any code deliberately using this quirk), you never know...

> but i guess it's a bug we can fix.
>
>
>> I ask because aptitude makes an attempt at using this mechanism to
>> locate it's state files, however, wishes also to keep a somewhat
>> distinct namespace:
>>
>>  Dir "/srv/sid";
>>  Dir::State "var/lib/apt";
>>  Dir::Aptitude "";
>>  Dir::Aptitude::State "var/lib/aptitude";
>
> I haven't tested it, but as a workaround it should be possible to
> set Dir::Aptitude="."; so that paths like /srv/sid/./var/lib/aptitude
> are returned by current FindFile implementation.
>

Well that actually makes the combining (or not) of the two
"namespaces" quite explicit--the "." is effectively a concatenation
operator ;-)

Still.. if separation is required: Aptitude::Dir::State and be done with it.

--
Daniel Hartwig


Reply to: