On 2014-10-02 04:46, banhbaochay wrote:
>
> @robin_listar: Thanks for helping. I change locale to POSIX and try
> zypper refresh with aria2 but no luck
I tried to reproduce your problem, but after setting “ZYPP_ARIA2C=1”, zypper did not use aria2c to download and install a test package.
Then I noticed that you said you are using openSUSE 12.3, when I use 13.1. Maybe 13.1 does not heed that variable.
> [zypp++] ExternalProgram.cc(start_program):229 Executing 'aria2c' '--user-agent=ZYpp 12.9.0 (aria2 version 1.16.1) openSUSE-12.3-x86_64' '--summary-interval=1' '--follow-metalink=mem' '--check-integrity=true' '--file-allocation=none' '--server-stat-of=/var/cache/zypp/aria2.stats' '--server-stat-if=/var/cache/zypp/aria2.stats' '--uri-selector=adaptive' '--use-head=false' '--max-tries=5' '--max-concurrent-downloads=5' '--connect-timeout=180' '--http-proxy=http://<myproxy>:8080' '--dir=/var/adm/mount/AP_0xbXD5Tr/repodata' '--conf-path=/var/tmp/TmpFile.6Y9mOL' 'http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz'
> 2014-10-02 09:23:19 <1> linux-ukui.site(3569) [zypp++] ExternalProgram.cc(start_program):381 pid 3619 launched
> 2014-10-02 09:23:20 <3> linux-ukui.site(3569) [zypp] MediaAria2c.cc(getFileCopy):363 Can't parse progress line '#62b801 0B/42KiB(0%) CN:1 DL:0B]'
> 2014-10-02 09:23:20 <2> linux-ukui.site(3569) [zypp] MediaAria2c.cc(getFileCopy):417 aria2c reported a file, but no progress data available
> 2014-10-02 09:23:20 <3> linux-ukui.site(3569) [zypp] MediaAria2c.cc(getFileCopy):363 Can't parse progress line '#62b801 0B/42KiB(0%) CN:1 DL:0B]'
> 2014-10-02 09:23:20 <1> linux-ukui.site(3569) [zypp++] MediaAria2c.cc(getFileCopy):377 aria2c reported: ' [AbstractCommand.cc:304] errorCode=22 URI=http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz'
> 2014-10-02 09:23:21 <1> linux-ukui.site(3569) [zypp++] MediaAria2c.cc(getFileCopy):377 aria2c reported: ' [AbstractCommand.cc:304] errorCode=22 URI=http://widehat.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz'
> 2014-10-02 09:23:21 <3> linux-ukui.site(3569) [zypp] MediaAria2c.cc(getFileCopy):363 Can't parse progress line '#62b801 0B/42KiB(0%) CN:1 DL:0B]'
> 2014-10-02 09:23:21 <2> linux-ukui.site(3569) [zypp] MediaAria2c.cc(getFileCopy):417 aria2c reported a file, but no progress data available
But I can use aria2 to download this link
The problem is not that aria2c can’t download files, but that the output messages it prints are not understood by zypper: “Can’t parse progress line ‘#62b801 0B/42KiB(0%) CN:1 DL:0B]’”.
I initially thought that perhaps your locale setting was interfering.
Besides that:
> aria2c http://ftp.uni-kl.de/pub/linux/opensuse/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz
You have to do it in the exact same way as zypper is doing it:
aria2c --user-agent=ZYpp 12.9.0 (aria2 version 1.16.1) openSUSE-12.3-x86_64 --summary-interval=1 --follow-metalink=mem --check-integrity=true --file-allocation=none --server-stat-of=/var/cache/zypp/aria2.stats --server-stat-if=/var/cache/zypp/aria2.stats --uri-selector=adaptive --use-head=false --max-tries=5 --max-concurrent-downloads=5 --connect-timeout=180 --http-proxy=http://<myproxy>:8080 --dir=/var/adm/mount/AP_0xbXD5Tr/repodata --conf-path=/var/tmp/TmpFile.6Y9mOL http://download.opensuse.org/update/12.3/repodata/72ec1c0ce1e356099d4b423de344bf03ed9acd1d9fdffbfd7da1205697a91c52-app-icons.tar.gz
And of course, you have to ensure that the configuration files and directories given in there do exist and have the same content…
>
>
> Notice that the user-agent is not my setting (I set it to MozillaFirefox
> in /root/.aria2/aria2.conf), but http-proxy is my setting
See above.
Notice that setting the agent to something different than ZYpp may confuse MirrorBrain-zypper combo (educated guess).
What I would do is NOT set “ZYPP_ARIA2C=1”. I’m not sure that the feature is still maintained.
> @hccv: Yes, I have a problem while refreshing repository (the same while
> installing). I know the reason is located curl which is used by zypper
> (default). I can’t config curl behind proxy and I can use wget/aria2 to
> download packages from repo. So I want to change default downloader of
> zypper to wget. Hope it help you understand my problem
AHHHH! No, you can not do that.
You’d have to reprogram zypper to understand wget. If memory serves me, they used curl and not wget because there is a library to do it. wget they’d have to use as external program, same as they did with aria2c (and they dropped it for the same reason).
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)