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

Support creating new repository type via bindings #2

Merged
merged 1 commit into from
Jan 16, 2012
Merged

Support creating new repository type via bindings #2

merged 1 commit into from
Jan 16, 2012

Conversation

karelklic
Copy link
Contributor

Dear all,

here are libsolv bindings supporting the creation of new repositories.

We store package metadata in a MySql database and we need to do dependency resolution on them. As the system dealing with the packages is in Python, it's useful to fill libsolv data structures from MySql via Python as well, without resorting to C :-)

Run-tested, works well. Please consider accepting the patch.

@mlschroe
Copy link
Member

Thanks. I'll merge it but I'm going to change the dependency accessors afterwards, because I don't want to expose the repo's "idarraydata" element. (And the s->requires = repo_addid_dep(s->repo, s->requires, id, 0) interface is really much too low level for the bindings.)

So I'm going to replace it with add_provides/add_requires methods.

I'm not really sure how to make the provides of a solvable available, I could add a XSolvable_provides_get function that reurns a "Dep" array, put then people might think they can do s.provides.push(id), which wont work. So maybe we need to use functions here as well (s.set_provides([...])). Any suggestions?

mlschroe added a commit that referenced this pull request Jan 16, 2012
Support creating new repository type via bindings
@mlschroe mlschroe merged commit 940f21b into openSUSE:master Jan 16, 2012
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

2 participants