Blob Blame Raw
From f86490ef61704f9ca86841c533643650b522703d Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Thu, 4 Oct 2012 11:45:34 +0100
Subject: [PATCH 8/8] offline-updates: Only save packages that have been
 updated or installed in the offline-update-competed
 file

---
 contrib/systemd-updates/pk-offline-update.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c
index a012e12..4ddddb5 100644
--- a/contrib/systemd-updates/pk-offline-update.c
+++ b/contrib/systemd-updates/pk-offline-update.c
@@ -282,8 +282,15 @@ pk_offline_update_write_results (PkResults *results)
 		string = g_string_new ("");
 		for (i = 0; i < packages->len; i++) {
 			package = g_ptr_array_index (packages, i);
-			g_string_append_printf (string, "%s,",
-						pk_package_get_id (package));
+			switch (pk_package_get_info (package)) {
+			case PK_INFO_ENUM_UPDATING:
+			case PK_INFO_ENUM_INSTALLING:
+				g_string_append_printf (string, "%s,",
+							pk_package_get_id (package));
+				break;
+			default:
+				break;
+			}
 		}
 		if (string->len > 0)
 			g_string_set_size (string, string->len - 1);
-- 
1.7.12