On 2/17/07, Dan McGee <dpmcgee@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.