[pacman-dev] [patch] testdb

Nagy Gabor ngaba at bibl.u-szeged.hu
Mon Oct 8 10:37:50 EDT 2007

Patch attached:
> -you don't free() anything in testpkg.c; this is not a big problem, but
> rigorous c-programmers frees everything in even helloworld.c;-)
the patch (hopefully) fixes them.
> -conflict checking also would be nice and easy to implement
this is also done; but TODO: I did a dirty hack to make check_conflict visible
from testdb.c (I'm not familiar in these static/symexport... stuffs,
check_conflict probably should be renamed, too)
> -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
cannot implement easily, because db->pkgcache == NULL doesn't mean empty
pkgcache (this means pkgcache is not loaded, and induces a reload); [int
pkgcache_loaded entry in pmdb_t would be helpful here]
> -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]")

Bye, ngaba

SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testdb.diff
Type: application/octet-stream
Size: 2271 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20071008/ece5fb47/attachment.obj>

More information about the pacman-dev mailing list