[packagekit] remove packages while installing policy issue

Sebastian Heinlein glatzor at ubuntu.com
Wed Aug 12 23:48:58 PDT 2009


Am Mittwoch, den 12.08.2009, 10:37 -0700 schrieb Daniel Nicoletti:
> As simulate_* is almost done, the policy part must
> be done two, as we talked on IRC fist I was thinking the
> logic to call polkit-remove-packages when installing would
> be up to the GUI (It would detect that REMOVING packages
> were emitted and ask polkit to authenticate too).
> But with polkit-1 GUI's don't need talk with it anymore so
> we need another way to do that (which makes the GUI clear imo).
> 
> One of the options is to break again the API (the sooner the better imo),
> to:
> installPackages(only_install, only_trusted, pkg_ids);
> removePackages(only_remove, pkg_ids, allow_deps, autoremove);
> // BTW what's the difference from allow_deps and autoremove?
> updatePackages(only_update, only_trusted, pkg_ids);
> And add some error codes like
> ERROR_POLICY_INSTALL_NEEDED
> ERROR_POLICY_REMOVE_NEEDED
> 
> This solves the issue as we do the same with trusted.
> But others options are welcome :D

You not limited to e.g. "only_update" only, since an upgrade could
require to install and remove upgrades at the same time. So you would
have to ask for both permissions.

Perhaps using a bitwise flag would be better:

AUTH_INSTALL|AUTH_REMOVE

Cheers,

Sebastian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090813/9f3b8899/attachment-0004.pgp>


More information about the PackageKit mailing list