On Thursday 01 September 2011 13:19:01 Duncan Mac-Vicar P. wrote:
The hardest part IMHO is choosing the granularity
z.install("foo") is reading the list of repos, refreshing them, selecting some packages to be installed, and committing.
Also, you mention
z.what_provides(:capability => "smtp_daemon").each { |p| puts "#{p.name} #{p.version} #{p.repo.name}" }
So you are getting an object, but then you install by string. I guess the trick here is to offer them both, and then overload them in the script language as if they where one:
We can also work on the zypp solvers API side. AFAIK the solver is basically able to resolve requests like 'install one out of a set of packages'. There's just no zypp side api for this. But it would be handy in many cases, because you can define a query and ask the solver to install the best item within the matches. You could easily request to install foo foo >= 2.0 foo i586 foo but not from vendor 'baa' foo from repo x | repo y without need to figure out the 'best' choice with respect to the systems solver policies (allowVendorChange,noRecommends,..). -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org