[pacman-dev] testdb

Nagy Gabor ngaba at bibl.u-szeged.hu
Thu Oct 4 06:48:52 EDT 2007

First of all, many thanks to Xavier for this cool stuff.
Some suggestions/feature requests:
-you don't free() anything in testpkg.c; this is not a big problem, but rigorous
c-programmers frees everything in even helloworld.c;-)
-conflict checking also would be nice and easy to implement
-a small speedup suggestion (however, speed is not important here):
line 176: data = alpm_checkdeps(db, PM_TRANS_TYPE_ADD, alpm_db_getpkgcache(db));
here you could use a fake_empty_db as a first parameter: -O(n^2) operation
-my biggest feature request: an option to fix the problems instead of just
listing them (at least rewrite wrong requiredby fields, and a suggestion "pacman
-S --asdeps [missingdeps]")

I will share my results with you, this is a nice database-breaker-bug history:
-testdb found many duplicated requiredby fields; I had to fix them with
db-fix.sh + re-pacman + pacman -U (I have no net at home at the moment; see my
biggest feature request ;-)
-testdb found 4 other wrong requiredby fields (however, extra requiredby field
doesn't cause an error now: see remove048.py): this is the category of the
REMOVEUPGRADE transaction: requiredby004.py
-and an other old bug (fixed): sysvinit needs awk, gawk provides awk; and
sysvinit wasn't listed in requiredby field of gawk.

Bye, ngaba

SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/

More information about the pacman-dev mailing list