refactoring rpmkit.extras.updateinfo: extract re-usable part from dump_updates_list to dump_updates_list