Clean up all old yumdb entries when updating packages
Clean up all old yumdb entries when updating packages

When writing out yumdb updates, make sure to delete old entries for
packages we're updating. Previously, we would only clean up old entries
for packages that got explicitly removed; this makes sure that we also
remove entries for previous versions when doing package updates.

https://bugzilla.redhat.com/show_bug.cgi?id=1259865

Closes: #119
Approved by: hughsie

hughsie/libhif,rpm-software-management/libhif,rpm-software-management/libhif,edynox/libdnf,rpm-software-management/libdnf,hughsie/libhif,rpm-software-management/libhif,rpm-software-management/libdnf,Conan-Kudo/libhif,hughsie/libhif,hughsie/libhif,rpm-software-management/libdnf,Conan-Kudo/libhif,edynox/libdnf,Conan-Kudo/libhif,rpm-software-management/libdnf,Conan-Kudo/libhif,edynox/libdnf,rpm-software-management/libhif,edynox/libdnf