coreos/update_engine — pull request #46 by marineam (2014-09-19 03:36:20+00:00)
Title: Forced updates uber magic code removal

This PR does exactly nothing while removing a net 3629 lines. It is beautiful.

I started digging into why `update_engine_client -update` did not force the update like it claims it does. Turns out this broke back in commit f6035bf when the dbus interface was cleaned up. The ability to override the app version was disconnected but the force updated mechanism relied on setting the version to `ForcedUpdate`. Even if the feature wasn't broken it still would have only worked on developer images.

Instead of re-enabling this scheme I've opted to rip it out instead. There is another parameter that already exists and works even better. When an update is requested via the dbus API it is marked as 'interactive' and the request includes the attribute `installsource="ondemandupdate"`. Normally the attribute is `installsource="scheduler"`. Using this as the signal allows the update service to still respond "noupdate" if the user is already on the latest version since the version info is still included in the request.

So this PR removes the plumbing for the broken forced update mechanism and related dead code I found along the way. It doesn't actually fix the issue or alter update_engine's behavior in any way, the fix will have to be made in the update service instead.