[pacman-dev] [PATCH] Fix some memleaks in alpm/add.c

Nagy Gabor ngaba at bibl.u-szeged.hu
Sat Jul 19 15:43:05 EDT 2008


> > Well, now our add code won't stop in case of error just go ahead;-)
> > As I guessed this behaviour change was introduced by commit
> > 591bfabbd38bf4f8f209977f416a4e5fd3cc2baf, where we split the huge
> > add_commit function. So to answer to your question, I think we
> > should. Others?
> >
> 
> There is no point discussing whether we should use it or not, what is
> important is to discuss *how* to use it.
> There are two main ways :
> 1) just printing a message : error, warning or just debug ?

Most of them is printed via alpm_log in the split function.

> 2) stops here, and probably returning -1 . Should we run ldconfig
> before returning?

Before the mentioned commit, we followed 2) without ldconfig. Now we
don't stop (and thus run ldconfig always).

> 
> The ldconfig question in case 2 also applies to the case where we
> cancel a transaction with ctrl+c (sate_interrupted).
> 

I can cancel the transaction in the middle of a commit? (I mean
"between" packages...) That's not good. If pacman upgraded only the half
of the packages, inconsistent database is predicted. (Maybe I'm too
strict here.)

This is true for the original question, the ability to rollback the
transaction would be the best there. Without rollback I have no clue...
Maybe the current one is better. Others?

Bye




More information about the pacman-dev mailing list