util: Don't do libsolv cache for temporary sacks

We should really only generate a cache for the current root's rpmdb; this
function can be used for e.g. `db diff` and it doesn't make sense to generate a
libsolv cache for arbitrary commits since it's unlikely they get reused.

Closes: #1238
Approved by: jlebon
This commit is contained in:
Colin Walters 2018-02-07 14:23:39 -05:00 committed by Atomic Bot
parent 782c49b748
commit cd9e0c8ec7

View File

@ -809,7 +809,7 @@ get_sack_for_root (int dfd,
g_autoptr(DnfSack) sack = dnf_sack_new (); g_autoptr(DnfSack) sack = dnf_sack_new ();
dnf_sack_set_rootdir (sack, fullpath); dnf_sack_set_rootdir (sack, fullpath);
if (!dnf_sack_setup (sack, DNF_SACK_LOAD_FLAG_BUILD_CACHE, error)) if (!dnf_sack_setup (sack, 0, error))
return FALSE; return FALSE;
if (!dnf_sack_load_system_repo (sack, NULL, 0, error)) if (!dnf_sack_load_system_repo (sack, NULL, 0, error))