Use rpm python bindings instead of popen("rpm -qa"). Index by name-epoch-version-release-arch.