[pacman-dev] [PATCH 5/5] use resolved_path for filelist_contains

Allan McRae allan at archlinux.org
Sat Feb 16 20:45:12 EST 2013

On 17/02/13 11:17, Allan McRae wrote:
> On 17/02/13 11:08, Andrew Gregory wrote:
>> On Sun, 17 Feb 2013 10:32:48 +1000
>> Allan McRae <allan at archlinux.org> wrote:
>>> On 16/02/13 12:02, Andrew Gregory wrote:
>>>> alpm_filelist_contains was being used to search for resolved paths, but
>>>> searching in the unresolved paths, causing it to miss matches.
>>>> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
>>>> ---
>>> Instead of requiring _alpm_filelist_resolve() to be called before
>>> calling alpm_filelist_contains(), just add the call in
>>> alpm_filelist_contains() itself.  If the filelist has already been
>>> resolved, it returns immediately anyway.
>>> As an aside - this whole situation really sucks!  We now are resolving
>>> every path...
>> I considered doing that.  The reason I decided not to was that
>> alpm_filelist_contains wouldn't be able to easily notify the caller if
>> there's an error resolving the files.  We aren't checking for those
>> errors at the moment, but it would be good to add that at some point.
> But there is no indication that the resolve function needs to be called
> first for the filelist_contains function to work.

Also, I just noticed that alpm_filelist_contains() is public,
_alpm_filelist_resolve() is not...   This is a bit of a mess.


More information about the pacman-dev mailing list