On Mon, Jul 16, 2007 at 04:31:32PM +0200, ngaba@petra.hos.u-szeged.hu wrote:
About corrupted db, most db are already corrupted, but in a less important way : extra required by field (fixed by your upgraderm patch), instead of missing required by fields as it's the case here. But so, couldn't we have an option in pacman for repairing requiredby fields or something ? Well, in the future alpm_db_test should do a deeper db check (and try to fix errors: for example requiredby fields can be generated from depends easily); now it only does very basic "syntax" checking, which is a bit confusing for me (consistency check means more IMHO).
Yes indeed, that's what I was thinking about. Maybe it could also look for broken dependencies also (mostly breakage caused by --nodeps). The problem is I'm not sure it fits perfectly in libalpm. Maybe it should rather be an external tool, using libalpm (in src/util/). That should be enough at least for checking, but for writing to the database in order to correct inconsistencies, I'm not sure..