[zypp-devel] Satsolver & solvable install size
Hello, I'm using libsatsolver in a project right now (the first non-zypp usage?) and while it works perfectly, I have a few questions: * Would it be possible to add an install size for solvables? This would be really useful for generating the install size of solutions after the dependency resolution is performed. * Would it be possible to merge the functionality of select_solvable() from testsuite/deptestomatic.c into the main library? Looking up the name-to-id mapping is going to be a pretty common operation, I think, and I can't see anything in libsatsolver proper that does it. Thanks, Matt -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi Matt, On Mon, 29 Oct 2007, Matt Barringer wrote:
I'm using libsatsolver in a project right now (the first non-zypp usage?) and while it works perfectly, I have a few questions:
* Would it be possible to add an install size for solvables? This would be really useful for generating the install size of solutions after the dependency resolution is performed.
I'm currently working on a sort of attribute store, where you can, well, store attributes for each solvable (as form of name,value pairs). One of the attributes could be the installed size. It's (planned to be) stored fairly space-efficient, and also will have a small query interface for searching (of course not as elaborate as sqlite). See tools/attr_store* for the work in progress. I wouldn't want to bloat the Solvable data structure even more whenever some new wish for an interesting attribute comes up. It should hold only the information essential for solving the dependency problem. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Mon, 29 Oct 2007, Michael Matz wrote:
I'm currently working on a sort of attribute store, where you can, well, store attributes for each solvable (as form of name,value pairs). One of
That sounds perfect! Thanks, Matt -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Michael Matz
I wouldn't want to bloat the Solvable data structure even more whenever some new wish for an interesting attribute comes up. It should hold only the information essential for solving the dependency problem.
Finding a 'good' solution most probably needs this data, e.g. - check vendor (only upgrade to same vendor) - check size (prefer solutions with small download size) - ... Such decisions are to be taken during dependency solving and are controlled by policies. Tools like YUM and APT have a nice policy model, allowing one to code policy extensions (i.e. in perl or python) taking such 'extended attributes' into account. Moving forward, we should define a list of 'default' (read: present for packages) attributes and how to access them. Next step would be a 'policy api' allowing user-defined policies to be included in the solving. Klaus -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Monday 29 October 2007 16:20:56 Matt Barringer wrote:
* Would it be possible to merge the functionality of select_solvable()
Actually this function is also in the language bindings. -- Duncan Mac-Vicar Prett Novell :: SUSE R&D, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Mon, 29 Oct 2007, Duncan Mac-Vicar Prett wrote:
Actually this function is also in the language bindings.
The project I'm working on now is written in C, and the sat-solver C API doesn't seem to have anything. So I'm currently using a local tweaked version of the function in deptestomatic.c, modified to search all repositories in a pool for the package name. That reminds me, though, has there been work on a python wrapper? Thanks, Matt -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Matt Barringer
On Mon, 29 Oct 2007, Duncan Mac-Vicar Prett wrote:
Actually this function is also in the language bindings.
The project I'm working on now is written in C, and the sat-solver C API doesn't seem to have anything.
And we're not planning to add such functionality to the satsolver C API. However, we do plan for an application layer on top of satsolver providing the requested functions (and more). Maybe its about time to start on this layer ?!
That reminds me, though, has there been work on a python wrapper?
Duncan added Swig bindings last week. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Monday 29 October 2007 17:06:26 Klaus Kaempf wrote:
And we're not planning to add such functionality to the satsolver C API.
Well, the repository <-> solv format reading APIs is right now separated in another directory. I think it makes sense to have such functions, it is impossible to use the solver without them, you can see the function is in deptestomatic.c, in yps.c , in the bindings and in Matt's code. However, it should probably not be in the solver core code, but somewhere along the other "tools". Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Duncan Mac-Vicar Prett
On Monday 29 October 2007 17:06:26 Klaus Kaempf wrote:
And we're not planning to add such functionality to the satsolver C API.
Well, the repository <-> solv format reading APIs is right now separated in another directory.
[...]
However, it should probably not be in the solver core code, but somewhere along the other "tools".
Exactly. Klaus -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Monday 29 October 2007 16:53:54 you wrote:
On Mon, 29 Oct 2007, Duncan Mac-Vicar Prett wrote:
Actually this function is also in the language bindings.
The project I'm working on now is written in C, and the sat-solver C API doesn't seem to have anything. So I'm currently using a local tweaked version of the function in deptestomatic.c, modified to search all repositories in a pool for the package name.
we should have both functions, they are both useful
That reminds me, though, has there been work on a python wrapper?
I could easily generate bindings for C#, Java, Python, Perl etc. For python I need to implement iterators. in ruby I can do object.each_something do |foo| { do something with foo } and in the bindings can get foos in real time, without needeing to have a preallocated list of foos. The each function calculate them and send them to the block passed. This s useful when you don't have the list to iterate, and you figure it at run time. Python does not have this cool thing, they have iterators, and I searched on how to implement an iterator from C and the level of documentation seems to be very bad. Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
Duncan Mac-Vicar Prett
-
Klaus Kaempf
-
Matt Barringer
-
Michael Matz