[pacman-dev] [PATCH] Allow files entries to be read from a sync database

Allan McRae allan at archlinux.org
Tue Jan 18 21:02:01 EST 2011


On 19/01/11 11:48, Dan McGee wrote:
> On Tue, Jan 18, 2011 at 7:41 PM, Allan McRae<allan at archlinux.org>  wrote:
>> On 19/01/11 10:50, Dan McGee wrote:
>>>
>>> Nothing will use this yet, but we might as well read the info in while
>>> processing the database. The drawback would be vastly increased memory
>>> usage, so we might want to add a flag enabling/disabling the loading of
>>> this
>>> data.
>>>
>>> This will at least for now be unused by pacman, but a pkgfile.c program at
>>> least now has the option of using standard libalpm interfaces to search
>>> for
>>> file ownership.
>>>
>>> Signed-off-by: Dan McGee<dan at archlinux.org>
>>> ---
>>> Thoughts from the peanut gallery?
>>>
>>
>> Not only will memory usage increase massively, but the read speed of the
>> sync databases will also take a decent hit.  I'd very much want to
>> reintroduce some lazy loading to the sync database reading just for this,
>> especially since that files list would only be needed for a -So operation.
>
> Sure- but I wasn't planning on telling anyone to point pacman at any
> databases with files anytime soon.

Well, the feature is now in repo-add so I am sure there will be some 
repos that start using it...  As long as they are not repos that I am 
using, all is good!

> However, thi would be extremely
> useful for a libalpm-based pkgfile replacement as I said in the commit
> message. Right now, there is no possibility at all of doing that with
> libalpm.
>
> I'm also leaning against reintroducing lazy loading, and more toward a
> DB-register-time argument that will allow or deny the loading of files
> entries from the sync DB handed to the library. This will keep us from
> having to add back all the cache BS we worked hard to remove.

Indeed, that does sound a better idea.

Allan


More information about the pacman-dev mailing list