On Sat, Jul 07, 2007 at 09:27:33PM +0200, Xavier wrote:
And the alpm_release function in libalpm/alpm.c :
77 while((dbs_left = alpm_list_count(handle->dbs_sync)) > 0) { 78 pmdb_t *db = (pmdb_t *)handle->dbs_sync->data; 79 _alpm_log(PM_LOG_DEBUG, _("removing DB %s, %d remaining..."), db->treename, dbs_left); 80 alpm_db_unregister(db); 81 db = NULL; 82 }
There is an infinite loop there when alpm_db_unregister (db.c) fails,
oops the _alpm_log line was cut during pasting, fixed it :) Anyway, I forgot to mention I found where this code was introduced : http://projects.archlinux.org/git/?p=pacman.git;a=commitdiff;h=55f178c629ada... So it looks like what the previous code did was even worse :) While I'm not very happy about how it was fixed, I can't find a better way to fix it.. I still think it's not very nice to have a code like that which can loop infinitely so easily.