From 40135860e863b4ce64fd1163f321ef7e2d36bd15 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 18 Sep 2015 13:19:31 +0200 Subject: [PATCH] offline update: Process updates triggered by older PackageKit versions This commit adds compatibility with the previous PackageKit versions that used to symlink /system-update to /var/cache. When combined with online updates, we might get in a situation where the offline updater has to process updates prepared by an older PackageKit. In that case, if we simply 'exit 0', we end up in a system that always boots in the offline update mode and hangs there. --- client/pk-offline-update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/pk-offline-update.c b/client/pk-offline-update.c index b29d821c3..fee526128 100644 --- a/client/pk-offline-update.c +++ b/client/pk-offline-update.c @@ -395,7 +395,8 @@ main (int argc, char *argv[]) retval = EXIT_SUCCESS; goto out; } - if (g_strcmp0 (link, "/var/cache/PackageKit") != 0) { + if (g_strcmp0 (link, "/var/cache/PackageKit") != 0 && + g_strcmp0 (link, "/var/cache") != 0) { sd_journal_print (LOG_INFO, "another framework set up the trigger"); retval = EXIT_SUCCESS; goto out;