[packagekit] don't allow partial updates
Jesse Zhang
zh.jesse at gmail.com
Mon Mar 28 19:08:02 PDT 2011
On 03/28/2011 11:21 PM, Richard Hughes wrote:
> 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.
Both sound reasonable, but for conary the later solution is actually
enough. The current conary backend does implement UpdatePackages() but
it shouldn't have. For conary, the whole system is defined in a 'group'
package, which is versioned and contains packages that all have a
definitive version. So packages should always be updated together.
Conary now has a new operation mode (called 'system model'). If it's
enabled, the above behavior is enforced. Packages can't be updated to a
different version than that is referenced in the group, unless you use
some special commands.
jesse
More information about the PackageKit
mailing list