Boyd Timothy wrote:
I'm trying to implement:
1) GetDepends (http://www.packagekit.org/pk-reference.html#api-get-depends) - GetDepends should return packages that this package depends on. 2) GetRequires (http://www.packagekit.org/pk-reference.html#api-get-requires) - GetRequires should return packages that depend on this package.
I am interested in this, too, since i need to get that functionality into zypper. Using this code: CapSet capSet = pool_item.resolvable()->dep(zypp::Dep::PROVIDES); for (CapSet::const_iterator it = capSet.begin(); it != capSet.end(); ++it) { cout << it->refers().asString() << ": " << it->asString() << " --> " << it->kind() << endl; } cout << endl << _("Requires:") << endl; capSet = pool_item.resolvable()->dep(zypp::Dep::REQUIRES); for (CapSet::const_iterator it = capSet.begin(); it != capSet.end(); ++it) { cout << it->refers().asString() << ": " << it->asString() << " --> " << it->kind() << endl; } yields the following result (for zypper package): Provides: package: y2pmsh --> namedcap package: zypper == 0.9.2-4 --> namedcap package: /etc/logrotate.d/zypper.lr --> filecap package: /usr/bin/installation_sources --> filecap package: /usr/bin/zypper --> filecap package: /usr/sbin/zypp-checkpatches --> filecap package: /usr/sbin/zypp-checkpatches-wrapper --> filecap Requires: package: procps --> namedcap package: permissions --> namedcap package: libc.so.6(GLIBC_2.2.5)(64bit) --> namedcap package: libpthread.so.0()(64bit) --> namedcap package: libstdc++.so.6()(64bit) --> namedcap package: libm.so.6()(64bit) --> namedcap package: libc.so.6()(64bit) --> namedcap package: libpthread.so.0(GLIBC_2.2.5)(64bit) --> namedcap package: libstdc++.so.6(CXXABI_1.3)(64bit) --> namedcap package: libc.so.6(GLIBC_2.4)(64bit) --> namedcap package: libstdc++.so.6(GLIBCXX_3.4)(64bit) --> namedcap package: libgcc_s.so.1()(64bit) --> namedcap package: libgcc_s.so.1(GCC_3.0)(64bit) --> namedcap package: libstdc++.so.6(GLIBCXX_3.4.9)(64bit) --> namedcap package: libreadline.so.5()(64bit) --> namedcap package: libboost_regex.so.1.33.1()(64bit) --> namedcap package: libzypp.so.401()(64bit) --> namedcap package: /bin/sh --> filecap For example, i wonder about the dependency of zypper on libzypp _package_ (specified through BuildRequires in the spec file) which is represented by package: libzypp.so.401()(64bit) --> namedcap in the list above. How do i get 'libzypp > 3.23.1' out of it? Is it possible at all? It is not even in the generated (yum factory) metadata: <rpm:entry name="libzypp.so.401"/> I can imagine searching byName "libzypp" byKind package and checking which one of them provides libzypp.so.401. But i won't figure out libzypp > 3.23.1 out of it. Jano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org