A short post with some words of praise for aria2.
Today I was on an extremely bad network, but I needed to download some important packages (wicd + deps) for my Arch Linux machine.
# pacman -S wicd-gtk
The packages were just 1.17 MiB in size, so I hoped that the download would go well.
Unfortunately, pacman — the package manager for Arch Linux — didn't like the network at all and the download kept failing with messages such as:
error: failed retrieving file 'wpa_supplicant-2.0-4-i686.pkg.tar.xz' from ftp5.gwdg.de : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'wpa_supplicant-2.0-4-i686.pkg.tar.xz' from ftp5.gwdg.de : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
pacman uses curl for downloading, if I am not mistaken, so maybe it's curl's fault. Anyway, I decided to give aria2 a try.
So, I did:
# pacman -Sp wicd-gtk | aria2c -i -
and the package and all its dependencies were downloaded without a hitch!
If anyone's interested in what the above command means, here's the explanation:
pacman -Sp: Only list the urls from where the packages will be downloaded, on stdout, instead of downloading them.
|: Pipe the output to the following command :P
aria2c -i -: The
-iswitch specifies, that the urls for files to be downloaded, should be read from the given file. If
-is passed, then read the urls from stdin.
From my experience, aria2 is extremely resilient on bad networks, and this issue reinforced my faith in its capabilities.