[packagekit] remove packages while installing policy issue

Daniel Nicoletti dantti85-pk at yahoo.com.br
Thu Aug 13 07:46:00 PDT 2009


> 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

Well, I know we are not limited to, but as of today, any update
that will install packages only use update - auth.

I think we must clarify what can and what can't happen on each polkit
action like:

install-files can:
- install and update packages  (dependant packages)
Need:
- auth to remove or install/update untrusted

Install-packages can:
- install and update packages  (dependant packages)
Need:
- auth to remove or install/update untrusted

update-packages can:
- install  (dependant packages) and update packages
Need:
- auth to remove or install/update untrusted

remove-packages can:
- remove packages only
Need:
- auth to install / update trusted
- auth to install / update untrusted

update-system can:
- install/remove/update trusted
Need:
- auth to install/update untrusted

Is this sane?
Daniel.




----- Mensagem original ----
> De: Sebastian Heinlein <glatzor at ubuntu.com>
> Para: PackageKit users and developers list <packagekit at lists.freedesktop.org>
> Enviadas: Quinta-feira, 13 de Agosto de 2009 3:48:58
> Assunto: Re: [packagekit] remove packages while installing policy issue
> 
> 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



      ____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com



More information about the PackageKit mailing list