Mailinglist Archive: zypp-devel (56 mails)

< Previous Next >
Re: [zypp-devel] How to get a packages' depends and requires from libzypp
  • From: Stanislav Visnovsky <visnov@xxxxxxx>
  • Date: Thu, 6 Dec 2007 11:08:44 +0100
  • Message-id: <200712061108.44803.visnov@xxxxxxx>
Dňa Thursday 06 December 2007 10:56:01 Duncan Mac-Vicar Prett ste napísal:
On Wednesday 05 December 2007 19:40:50 Michael Andres wrote:
On Wed, Dec 05, Duncan Mac-Vicar Prett wrote:
The API is here:

In short:

What we figured yesterday on irc, is that PackageKit GetDepends and
GetRequires methods intend to return the list of packages that package
depends on, which is really wrong:

- Packages depend on capabilities other packages can provide
- You can not know which one will be the candidate selected for providing
that (can be one, can be none) until you have a solver run.

The only things you can emulate using this workaround:

- Look a package requires and use CapMatchHelper to see wich packages in
the pool are matched by that capability, this means if foo requires and bar1 and bar2 provides that, you will get both packages back.

- Do a solver run for the case of installing a single package and see which
packages the solver mark for installation (isToBeInstalled() isBySolver())
but this also would mark a broken requires for another package for
installation, like you have mplayer installed which depends on libsdl, but
libsdl was uninstalled by rpm -force, the solver will mark for installation
even if it is not a requires of foo, anyway I am not 100% sure if this is
the behavior libzypp does right now (moving the system automatically to a
consistant state).

At the beginning I thought libzypp was making everything more complex, but
I think PackageKit is also asking the wrong question.

Yes, it sounds like they are oversimplifying dependency resolution.

To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups