shiningxc at gmail.com
Thu Oct 4 07:53:16 EDT 2007
On Thu, Oct 04, 2007 at 12:48:52PM +0200, Nagy Gabor wrote:
> 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]")
Right, it can be improved, patches are welcome :)
> 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 ;-)
You can just do : pacman -S <broken packages>
Required By fields are rebuilt when reinstalling packages.
> -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.
Right, my database had also many breakages :) I just reinstalled the affected
packages, it's very quick and easy.
More information about the pacman-dev