[pacman-dev] [PATCH] Fully implement database lazy loading

Dan McGee dan at archlinux.org
Mon Sep 14 23:59:44 EDT 2009


On Mon, Sep 14, 2009 at 10:49 PM, Dan McGee <dan at archlinux.org> wrote:
> Commit 34e1413d75 attempted to implement lazy loading of package databases.
> Although it took care of my main complaint (creating the database directory
> if it didn't exist), it didn't allow sync repos to be registered before
> alpm_option_set_dbpath() had been called.
>
> With this patch, we no longer compute the individual repository DB paths
> until necessary, allowing full lazy loading to work as intended, and
> allowing us to drop the extra setlibpath() calls from the frontend. This
> allows the changes introduced in a2cd48960 (but later reverted) to be added
> back in again.
>
> Signed-off-by: Dan McGee <dan at archlinux.org>
> ---
>  lib/libalpm/add.c      |   13 +++++----
>  lib/libalpm/be_files.c |   39 +++++++++++++++++++-----------
>  lib/libalpm/db.c       |   61 ++++++++++++++++++++++++++++-------------------
>  lib/libalpm/db.h       |    8 ++++--
>  lib/libalpm/remove.c   |    4 +-
>  src/pacman/pacman.c    |    5 +---
>  6 files changed, 75 insertions(+), 55 deletions(-)

I'm expecting a careful review of this one from Xavier as his patch
blew up pactest on the maint branch. :P

-Dan


More information about the pacman-dev mailing list