[packagekit] Resolve method

Robin Norwood rnorwood at redhat.com
Tue Oct 2 09:24:47 PDT 2007

Richard Hughes <hughsient at gmail.com> writes:

> Yes, hmm, good questions. I must admit, the nuances of this escaped me
> late last night.
> The whole idea for resolve is for the user to eventually type "pkcon
> install openoffice-clipart" or for the openoffice program to request
> that "openoffice-clipart" is to be installed without knowing the
> package_id. It can also be used to see if a package has been installed
> without searching for files or doing other hacks.
> With this in mind I think we can say that:
> * Resolve will always return a Package of the installed version (if
> installed)
> * Resolve will also return as "available" a single Package if
> installable or upgradeable. This should be the highest version number of
> all the available candidates.
> So in theory doing Resolve for kernel (when no updates are available)
> would give emit one Package entry with the highest installed version,
> even if multiple packages are installed. Doing it when there is an
> update waiting to be applied would give a Package of the "best"
> installed version, and a Package of the "best" available option.
> So, this would give exactly the output you have done in your examples;
> it allows us to check if a package is installed, if it has updates, or
> if it's available in the repo.

What about arch?  In situations where more than one arch is available,
IIRC, yum uses a complicated heuristic to try to 'guess' the right one.
Should individual backends to the guessing, or return multiple results
to let PK or the user pick the right one?  Do you always want Resolve to
give one or zero results, or is a list ok in some cases?


Robin Norwood
Red Hat, Inc.

"The Sage does nothing, yet nothing remains undone."
-Lao Tzu, Te Tao Ching

More information about the PackageKit mailing list