[pacman-dev] Database consistency checking

Xavier shiningxc at gmail.com
Fri Jul 20 04:53:48 EDT 2007


On Thu, Jul 19, 2007 at 09:28:42PM +0200, Nagy Gabor wrote:
> Well, I thought the following method (pseudocode)
> for (pkg in pkgcache) {
> pkgdup = alpm_pkg_dup(pkg);
> clean_requiredby(pkgdup);
> _alpm_pkg_update_requiredby(pkgdup);
> good = sort_then_compare_requiredby(pkg, pkgdup);
> alpm_pkg_free(pkgdup);
> }
> -------------
> depend checking is similar, just use alpm_checkdeps for a list containing
> pkgdup only.
> -------------

Indeed, I think it could be done that way, that would allow reusing the existing
code, and so probably the cleanest code for what we want to do.

The only thing that is worrying me is that ideally, depend and requiredby
checking would be done in the same time. There is no need to do every check
twice.




More information about the pacman-dev mailing list