[pacman-dev] CVS update of pacman-lib (14 files)

Aaron Griffin aaronmgriffin at gmail.com
Sat Feb 17 17:16:06 EST 2007

On 2/17/07, Dan McGee <dpmcgee at gmail.com> wrote:
> More a coding style thing:
> lib/libalpm/remove.c:
> +               _alpm_pkg_update_depends(info, 1 /*is a remove*/);
> Why do you need this remove parameter? You do things two different
> ways in the function now- once using the remove value passed in, and
> once like this:
> if(handle->trans && handle->trans->packages
>                                   && handle->trans->type == PM_TRANS_TYPE_REMOVE) {
> It seems like checking this at the top of the function and storing it
> to a variable then would be more effective then having a "magic
> parameter".

Yeah, what I was trying to do was steer away from tying that function
to a transaction object.  In fact, that one is even done wrong, and in
the case of an upgrade there are two transaction objects, so this
function needs a transaction passed in.
I'll probably move this to trans.c, and remove the "remove" parameter,
and pass in a transaction object.

More information about the pacman-dev mailing list