[pacman-dev] Huge cleanup of add.c and my attempt at fixing FS#7484

Xavier shiningxc at gmail.com
Mon Jul 16 05:47:12 EDT 2007


On Mon, Jul 16, 2007 at 11:16:28AM +0200, ngaba at petra.hos.u-szeged.hu wrote:
> Well, it needs further investigation and testing, but I don't see why that 
> provdiff stuff needed in add.c: upgrade is a "remove then add" process, 
> remove_commit and add_commit should manage requiredby fields properly. 
> However, see my next e-mail today.

I told Dan this part looked rather messy.
The problem I think is that we lose all works we do in deps.c
For example, we have this in checkdeps :

282               if(alpm_depcmp(pkg, depend)) {
283                 _alpm_log(PM_LOG_DEBUG, "checkdeps: dependency '%s' has moved from '%s' to '%s'",
284                           depend->name, alpm_pkg_get_name(oldpkg), alpm_pkg_get_name(pkg));
285                 satisfied = 1;
286                 break;
287               }

We already compute this information here, it's stupid to compute it again in add_commit .
The problem imo is that we need to store it somehow, and only register it to the database
when the transaction has been commited.

But I think it's a more general problem we have in all the dependencies code 
(as you already noticed for sortbydeps / checkdeps / resolvedeps) that we
lose all informations we compute (but maybe that general problem concerns also the whole
pacman/libalpm code).




More information about the pacman-dev mailing list