New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add public function to depsolv from a pool #46
Conversation
This can be useful for applications that do not work with repos in the filesystem, e.g, with databases. As long as the pool is pre-populated with repos, the depsolving still works. Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
const GStrv solvables, | ||
GError **error) | ||
{ | ||
g_assert (pool != NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g_return_val_if_fail, asserts are getting optimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok.
Do you have some use-case in mind for this? |
Yes, for Pulp like we were discussing on IRC the other day. I'll ask someone from Pulp to chime in. |
the problem here is that you won't be able to pass libsolv's Python pool to here... |
Even if we write a SWIG python binding to fus? |
since we are using GObject here, SWIG/Cython is no-go. We need to use GObject Introspection. But you would need to write gobject introspected bindings for libsolv... And I don't think anyone wants to do that. |
So do you think the easiest way would be to re-implement the algorithm in python? |
@r4f4 @ignatenkobrain you guys are 1h ahead of my current headache :D PS sorry for stupid questions, I don't know GObject/SWIG/Cython |
Answering myself: this would mean basically wrapping a lot of |
What about making it accessible via a native (C) Python extension? (FWIW I don't have much experience with this either) |
What exactly you want to make accessible? |
This can be useful for applications that do not work with repos in the
filesystem, e.g, with databases. As long as the pool is pre-populated
with repos, the depsolving still works.
Signed-off-by: Rafael Fonseca r4f4rfs@gmail.com