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 support to configure different download method #47

Open
gumik opened this issue Jan 19, 2017 · 5 comments
Open

Add support to configure different download method #47

gumik opened this issue Jan 19, 2017 · 5 comments

Comments

@gumik
Copy link

gumik commented Jan 19, 2017

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:799

@jjk-jacky
Copy link
Owner

jjk-jacky commented Jan 19, 2017 via email

@gumik
Copy link
Author

gumik commented Jan 20, 2017

Good point. There will be no support for progress bars.
My motivation for this is that in work I'm behind proxy server which parses each file through anti-virus software. In effect, when you download any bigger file, you don't get any content for several dozens seconds. Default alpm download method timeouts after 10 seconds. It means that I'm unable to upgrade any package from kalu. There may be of course other solution for this problem. But I didn't find any way to adjust timeout value. Do you know if it can be modified somehow? I think I need to dig into libalpm code to check how it's done and if it's configurable.

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.

@jjk-jacky
Copy link
Owner

jjk-jacky commented Jan 20, 2017 via email

@gumik
Copy link
Author

gumik commented Jan 20, 2017

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?

@jjk-jacky
Copy link
Owner

jjk-jacky commented Jan 20, 2017 via email

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

No branches or pull requests

2 participants