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.
This commit is contained in:
Kalev Lember 2015-09-18 13:19:31 +02:00
parent b2dfc4b729
commit 40135860e8

View File

@ -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;