Blame SOURCES/0001-dnf-Invalidate-the-sack-cache-after-downloading-new-.patch

fdc9ea
From cdbd27d699b51e37c533d07abd2f1ab26e11355c Mon Sep 17 00:00:00 2001
fdc9ea
From: Kalev Lember <klember@redhat.com>
fdc9ea
Date: Tue, 18 Dec 2018 01:02:27 +0100
fdc9ea
Subject: [PATCH] dnf: Invalidate the sack cache after downloading new metadata
fdc9ea
fdc9ea
This fixes first resolve() after refresh() to correctly return the new
fdc9ea
data.
fdc9ea
fdc9ea
https://bugzilla.redhat.com/show_bug.cgi?id=1642878
fdc9ea
---
fdc9ea
 backends/dnf/pk-backend-dnf.c | 4 ++++
fdc9ea
 1 file changed, 4 insertions(+)
fdc9ea
fdc9ea
diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
fdc9ea
index 5961f1258..47e565915 100644
fdc9ea
--- a/backends/dnf/pk-backend-dnf.c
fdc9ea
+++ b/backends/dnf/pk-backend-dnf.c
fdc9ea
@@ -1568,6 +1568,7 @@ pk_backend_refresh_cache_thread (PkBackendJob *job,
fdc9ea
 				 gpointer user_data)
fdc9ea
 {
fdc9ea
 	PkBackendDnfJobData *job_data = pk_backend_job_get_user_data (job);
fdc9ea
+	PkBackend *backend = pk_backend_job_get_backend (job);
fdc9ea
 	DnfRepo *repo;
fdc9ea
 	DnfState *state_local;
fdc9ea
 	DnfState *state_loop;
fdc9ea
@@ -1699,6 +1700,9 @@ pk_backend_refresh_cache_thread (PkBackendJob *job,
fdc9ea
 		return;
fdc9ea
 	}
fdc9ea
 
fdc9ea
+	/* invalidate the sack cache after downloading new metadata */
fdc9ea
+	pk_backend_sack_cache_invalidate (backend, "downloaded new metadata");
fdc9ea
+
fdc9ea
 	/* regenerate the libsolv metadata */
fdc9ea
 	state_local = dnf_state_get_child (job_data->state);
fdc9ea
 	sack = dnf_utils_create_sack_for_filters (job, 0,
fdc9ea
-- 
fdc9ea
2.19.1
fdc9ea