Blame SOURCES/0001-context-Fix-rpmdb-file-monitor-with-installs.patch

9fd87f
From efc37d3a9e52ebb83e4d686c81610277a4fb5ef7 Mon Sep 17 00:00:00 2001
9fd87f
From: Kalev Lember <kalevlember@gmail.com>
9fd87f
Date: Wed, 13 May 2015 13:42:55 +0200
9fd87f
Subject: [PATCH] context: Fix rpmdb file monitor with / installs
9fd87f
9fd87f
Commit c50214d43a20941b2a950dd04d822fdc33a137d0 added a guard that was
9fd87f
supposed to avoid firing the rpmdb monitor signals when using a
9fd87f
non-default install root, but got the guard condition backwards which
9fd87f
prevented it working with regular / installs.
9fd87f
9fd87f
Fixing this makes PackageKit properly invalidate its internal caches
9fd87f
when an external program, such as dnf, touches the rpmdb.
9fd87f
---
9fd87f
 libhif/hif-context.c | 2 +-
9fd87f
 1 file changed, 1 insertion(+), 1 deletion(-)
9fd87f
9fd87f
diff --git a/libhif/hif-context.c b/libhif/hif-context.c
9fd87f
index 59fe113..57bda46 100644
9fd87f
--- a/libhif/hif-context.c
9fd87f
+++ b/libhif/hif-context.c
9fd87f
@@ -1354,7 +1354,7 @@ hif_context_setup (HifContext *context,
9fd87f
 		return FALSE;
9fd87f
 
9fd87f
 	/* setup a file monitor on the rpmdb, if we're operating on the native / */
9fd87f
-	if (g_strcmp0 (priv->install_root, "/") != 0) {
9fd87f
+	if (g_strcmp0 (priv->install_root, "/") == 0) {
9fd87f
 		rpmdb_path = g_build_filename (priv->install_root, "var/lib/rpm/Packages", NULL);
9fd87f
 		file_rpmdb = g_file_new_for_path (rpmdb_path);
9fd87f
 		priv->monitor_rpmdb = g_file_monitor_file (file_rpmdb,
9fd87f
-- 
9fd87f
2.4.0
9fd87f