-
Notifications
You must be signed in to change notification settings - Fork 279
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
Improve pkgdb_access
API
#2313
base: main
Are you sure you want to change the base?
Improve pkgdb_access
API
#2313
Conversation
c7ef3b4
to
4b5996d
Compare
b873684
to
b125861
Compare
`pkgdb` works with multirepo, however, it's API is not aware that we sometimes want to work with some specific repo and not with all of them The idea of this PR is to allow all `pkgdb_*` functions to be able to select a set of repos to work with (e.g. that could be overriden from CLI args). The only option for now is to disable repos in the configuration which might be not convenient for some use cases.
613febf
to
5a5fbcd
Compare
I am puzzled about the usage of va_args here, I both like and dislike it |
I have the same feeling. The alternative is to use a list variable or even const char **. |
if we want to allow multiple -r argument (which I like) I think it would be easier to have a const char ** than a va_arg. I fail at seeing an easy way to convert multiple -r into a simple call to pkgdb_access with the current API, but I have only given it a few seconds of thinking. |
FYI: The current patch fixes my problem when I specify a custom/alternative repository (+ -U -n combination) :
Without these changes, pkg also handles the other repository (which may be broken) |
However, if we want to reuse the existing |
we have pkg_object as an opaque structure to hide ucl_object_t, we could use it to hide libucl. |
pkgdb
works with multirepo, however, it's API is not aware that we sometimes want to work with some specific repo and not with all of themThe idea of this PR is to allow all
pkgdb_*
functions to be able to select a set of repos to work with (e.g. that could be overriden from CLI args).The only option for now is to disable repos in the configuration which might be not convenient for some use cases.