rpm expects consistent data from the database. If the data is inconsistent
(i.e. you haven't done a --rebuilddb), all sorts of weird problems, including
seg faults, occur. Do a --rebuildb, and retry the operation. If you still
have a problem, tar up a copy of /var/lib/rpm and mail it to <email@example.com>
so I can figger what the problem is. Please include the version/release of
rpm that you used.