On Wednesday 05 December 2007 19:40:50 Michael Andres wrote:
On Wed, Dec 05, Duncan Mac-Vicar Prett wrote:
The API is here: http://svn.opensuse.org/svn/zypp/trunk/libzypp/zypp/CapMatchHelper.h
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 libc.so.6 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. I tried looking yum backend source code but they don't have it implemented. Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org