Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

r4f4
Copy link
Collaborator

@r4f4 r4f4 commented Oct 9, 2018

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

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);
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok.

@ignatenkobrain
Copy link
Member

Do you have some use-case in mind for this?

@r4f4
Copy link
Collaborator Author

r4f4 commented Oct 9, 2018

Yes, for Pulp like we were discussing on IRC the other day. I'll ask someone from Pulp to chime in.

@ignatenkobrain
Copy link
Member

the problem here is that you won't be able to pass libsolv's Python pool to here...

@r4f4
Copy link
Collaborator Author

r4f4 commented Oct 9, 2018

Even if we write a SWIG python binding to fus?

@ignatenkobrain
Copy link
Member

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.

@r4f4
Copy link
Collaborator Author

r4f4 commented Oct 9, 2018

So do you think the easiest way would be to re-implement the algorithm in python?

@dparalen
Copy link

dparalen commented Oct 9, 2018

@r4f4 @ignatenkobrain you guys are 1h ahead of my current headache :D
@r4f4 thanks for putting this up
@ignatenkobrain so if we used some list of list of dicts as a poor-mans pool, could that work?

PS sorry for stupid questions, I don't know GObject/SWIG/Cython

@dparalen
Copy link

dparalen commented Oct 9, 2018

@r4f4 @ignatenkobrain you guys are 1h ahead of my current headache :D
@r4f4 thanks for putting this up
@ignatenkobrain so if we used some list of list of dicts as a poor-mans pool, could that work?

PS sorry for stupid questions, I don't know GObject/SWIG/Cython

Answering myself: this would mean basically wrapping a lot of libsolv functionality in Fus just to be able to expose the API thru pygobject. Sounds like a terrible idea.

@dralley
Copy link

dralley commented Oct 10, 2018

What about making it accessible via a native (C) Python extension?

(FWIW I don't have much experience with this either)

@ignatenkobrain
Copy link
Member

What exactly you want to make accessible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants