-
Notifications
You must be signed in to change notification settings - Fork 15
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 support to configure different download method #47
Comments
Well, it's not as easy as you seem to think/make it out to be I'm
afraid.
That call to alpm_option_set_fetchcb() you link to does set a
function as callback, one that needs to be implemented - here in
pacman, and would have to be as well in kalu.
Of course, pacman can assume that when they exec curl, the user will
get download feedback from curl, it being called from a terminal and
all.
Not so much with kalu though, where kalu can't do any progress bars
anymore, and no output from curl (or whatever is used) is shown to the
user either.
So at least there would be the need to get the output and show it to
the user, knowning that is wouldn't be in a tty so it's more limited,
etc
In the end, it's a lot of trouble I'm not really interested in, and not
sure it's worth it either, to be honest.
|
Good point. There will be no support for progress bars. I did quick (and ugly) implementation for curl support. Just copied callback method from pacman. It works well. Of course progress bars have two states only, 0% - 100%. I think it's not a big issue. At least much less than unable to download anything. May be useful for any user behind corporate proxy. |
There's been talk about an option to do that on pacman-dev ML[1], it
hasn't happened/been applied yet but maybe you can apply the patch in
the mean time - though you seem to have done similar work already.
[1]
https://lists.archlinux.org/pipermail/pacman-dev/2016-December/021698.html
|
Oh, great! That would be exactly what I want. When this patch will be applied, are you good to make use of this setting in kalu? |
Absolutely, I intend to.
|
It would be really nice if kalu could support diffent download method. That's what can be configured in pacman via the following line in config file:
XferCommand = /usr/bin/curl -C - -f %u > %o
As kalu is reading pacman.conf, it may read this option too. I did small research and call to
alpm_option_set_fetchcb
function should be done when initializing alpm library in kalu and kalu-dbus. You can see how it's done in pacman source code: src/pacman/conf.c:799The text was updated successfully, but these errors were encountered: