[pacman-dev]  remove exit() calls from libalpm
vmiklos at frugalware.org
Fri Feb 17 09:30:07 EST 2006
On Sat, Feb 11, 2006 at 07:44:00PM +0100, Aurelien Foret <aurelien at archlinux.org> wrote:
> For instance, you chose to set pm_errno in db_open and pkg_new, but the
> pm_errno value can be overwritten.
> See code chunks where pkg_new is called: in case of a failure, pm_errno
> is set afterwards, meaning that the pm_errno value set in pkg_new is lost.
i think this is the right way, the "failed to prepare the transaction"
error message is more infomative as the "memory error" one for a
frontend. or don't you think so?
> It may or may not be more interesting to set pm_errno in the offending
> function, or upon return of the function.
> It depends on what is more meaningful from the frontend point of view...
i would say set pm_errno to PM_ERR_MEMORY, and if it's overwritten, then
it's not a problem, any error message other than PM_ERR_MEMORY is more
informative to the fronend. that's what my patch does.
> This is what I meant with this item of the TODO:
> "- review errors handling (globalise pm_errno usage, improve error
good to know. i thought you meant here the - already implemented - error
list on conflicting files or missing deps
udv / greetings,
Developer of Frugalware Linux, to make things frugal - http://frugalware.org
More information about the pacman-dev