[pacman-dev] Broken database with wrong requiredby fields

Xavier shiningxc at gmail.com
Mon Jul 16 09:30:42 EDT 2007


On Mon, Jul 16, 2007 at 09:11:09AM -0400, Dan McGee wrote:
> 
> You could add it to the DB test function, probably in the backend part
> of it. I think this is a valid thing to check.
> 

Looks like alpm_db_test is in db.c, but _alpm_db_test is in be_files, and it
suits perfectly there, since this is a low level check (it checks no files
are missing).
While my test is higher level, and rather belongs to deps.c maybe.
So maybe alpm_db_test in db.c could first call _alpm_db_test in be_files.c then
_alpm_check_requiredby or something in deps.c ?
Also should it try to repair it ?

It only detects the extra requiredby entries atm, which were fixed by Nagy
UPGRADERM patch.
But according to a recent mail from Nagy, there might be missing entries as
well, so it should probably compute everything again rather.
It would also make more sense to use the existing functions which do that
requiredby stuff in libalpm, like trans_update_depends, once it's fixed.

So the patch itself is totally useless :) It's mostly the idea that might be
interesting.




More information about the pacman-dev mailing list