What this really means that yum is too stupid to calculate the sha256 checksum correctly (and also too stupid to give you a sensible error message like “Sorry, primary.sqlite.bz2 is using a sha256 checksum, but I don’t know how to calculate that”).
The fix is simple:
yum install python-hashlib
from either rpmforge or epel, which makes the necessary libraries available for yum to calculate the new checksums correctly. Sorted.
This is a good comment:
“The reason it didn’t work for some of the commenters is that you must disable the offending repo before you can ‘yum install python-hashlib’. so go to /etc/yum.repos.d/newNotWorking.repo and set enabled=0. then yum install python-hashlib and then re-enable the new repo (enabled=1). check with ‘yum repolist’.”