If --rebuilddb fails, rpmdbRemoveDatabase(..) does not remove triggerindex.rpm and the temp dbpath. (sending patch to bugzilla) cu, Michael
Fixed in cvs (and probably in rpm-3.0.3-0.5 and later). Thanks for the patch.