Jan-Simon Möller wrote:
Moin moin!
for item in pool: ... print item.string() ... U__s_(2)ConsoleKit-x11-0.2.10-12.3.i586(software) [...] U__s_(546)hicolor-icon-theme-0.10-63.5.noarch(software)
Jippie - it works with zypp from svn. So just one more question: can i somehow only query
* packagename * version * repoalias
or do i need to extract this.
nope.. that would be shame for libzypp :O) This 'item' is probably a zypp::ui::Selectable (don't know what's the Python way of saying this), right? then 'item.name()' should work.
item.version()
This is a bit more complex: Resolvable::edition() is what you want, but a Selectable is a group of all available packages (well.. resolvables) with the same name and kind. Look at the Selectable interface to see what functions are there to get the Resolvables: available{Begin,End} - gets all of Selectable's Resolvables (as PoolItems!) installed{Begin,End} - gets only the installed ones theObj - gets the object with newest version and best architecture among the available objects candidateObj - the same as theObj :O) installedObj - the first of the installed objects a PoolItem contains ResStatus and a Resolvable, a Resolvable is a Package, Patch, Pattern, or Product (look at the doxygen docs, or c++ header docs).
item.repoalias()
Each Resolvable contains a reference to the Repository of origin and the associated RepoInfo object. You get the alias from that one. HTH, jano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org