[packagekit] don't allow partial updates

Richard Hughes hughsient at gmail.com
Mon Mar 28 08:21:38 PDT 2011


On 28 March 2011 15:08, Jesse Zhang <zh.jesse at gmail.com> wrote:
> Currently gpk-update-viewer allows users to check/uncheck updates, but
> it doesn't make sense in some cases, e.g. for the conary backend. It's
> fairly possible to break systems if an update-system is partially
> done.

Eeek. I didn't know it would break like this.

> Is it easy to solve?

Yup. There's two ways to do this:

If the updates set from GetUpdates can't be cherry-picked by the user,
we can emit a Message() with the type PARTIAL_UPDATES_NOT_ALLOWED or
something like that, which we can then catch in the GUI and hide the
checkbuttons.

An alternative, would be much simpler if it is always true for a
backend. Just don't implement UpdatePackages() -- just implement
UpdateSystem().

I think that the moment, gpk-update-viewer might explode in a ball of
fire, but it would be really simple to just detect if UpdatePackages()
is implemented and if not, hide the checkboxes and use
pk_task_update_system() instead. I guess kpackagekit would need the
same fix if it doesn't do this already.

I guess it depends on whether we need to have all the updates done at
once every time, or just some times.

Richard.


More information about the PackageKit mailing list