[pacman-dev] [PATCH] Remove REQUIREDBY usage from libalpm

Xavier shiningxc at gmail.com
Tue Nov 13 03:19:27 EST 2007


On Mon, Nov 12, 2007 at 08:07:25PM -0600, Dan McGee wrote:
> From: Dan McGee <dan at archlinux.org>
> 
> Instead of using the often-busted REQUIREDBY entries in the pacman database,
> compute them each time they are required. This should help many things:
> 
> 1. Simplify the codebase
> 2. Prevent future database corruption
> 3. Ensure when we do use requiredby, it is always correct
> 4. Shrink the pmpkg_t memory overhead
> 
> Signed-off-by: Dan McGee <dan at archlinux.org>
> ---
>  lib/libalpm/add.c      |    7 -----
>  lib/libalpm/alpm.h     |    1 -
>  lib/libalpm/be_files.c |   11 --------
>  lib/libalpm/db.c       |    1 -
>  lib/libalpm/deps.c     |   23 ++++++++++++----
>  lib/libalpm/package.c  |   23 -----------------
>  lib/libalpm/package.h  |    2 -
>  lib/libalpm/remove.c   |    9 +------
>  lib/libalpm/sync.c     |   49 ------------------------------------
>  lib/libalpm/trans.c    |   65 ------------------------------------------------
>  lib/libalpm/trans.h    |    1 -
>  src/pacman/package.c   |    4 ++-
>  src/pacman/query.c     |    5 +++-
>  src/util/testdb.c      |    8 +++---
>  14 files changed, 29 insertions(+), 180 deletions(-)
> 

It all looks good to me :) 150 lines removed, eheh.
The only change I found a bit strange was the testdb one, but I see you
already changed that on your branch. As you noticed, a lot of code in testdb
is obsolete now. So even more lines removed :)




More information about the pacman-dev mailing list