You are not logged in.
Description: This is a bash script that will generate another script which can be run on another box with aria2c installed. The job of the generated script is to download all the packages required for a system upgrade.
Why?: My only internet connection right now is a tethered mobile connection with a 2GB cap. When something like KDE 4.8 hits the servers (and even otherwise), a full system upgrade is not feasible. However, my brother has uncapped internet at work. So... you get the picture.
Manual: The script is rather simple and self explanatory. You can change most of the options and settings by editing the variables defined in the 'setVars' function. Dependencies?... bash, grep, sed, pacman and sudo on the Arch box to be upgraded; and bash and aria2c on the box used for downloading.
Suggestions are most welcome. If there is some other script or app that does this better, please do let me know.
Changelog:
v0.1: Initial release --> http://pastebin.com/nWzhKggT
Offline
Alternatively, you can just print the urls and stuff them into a file that you can feed to wget or some other app.
[karol@black ~]$ sudo pacman -Syup
:: Synchronizing package databases...
testing 148,1 KiB 350K/s 00:00 [###########################] 100%
community-testing 158,4 KiB 389K/s 00:00 [###########################] 100%
core 106,4 KiB 72,1K/s 00:01 [###########################] 100%
extra 1197,9 KiB 453K/s 00:03 [###########################] 100%
community 1056,4 KiB 207K/s 00:05 [###########################] 100%
xyne-any is up to date
archlinuxfr is up to date
archstuff is up to date
herecura-stable is up to date
andrwe is up to date
rfad is up to date
heftig 2,6 KiB 1436K/s 00:00 [###########################] 100%
:: Starting full system upgrade...
http://ftp5.gwdg.de/pub/linux/archlinux/testing/os/i686/gdk-pixbuf2-2.24.1-3-i686.pkg.tar.xz
http://ftp5.gwdg.de/pub/linux/archlinux/testing/os/i686/gtk-update-icon-cache-2.24.9-3-i686.pkg.tar.xz
http://ftp5.gwdg.de/pub/linux/archlinux/testing/os/i686/gtk2-2.24.9-3-i686.pkg.tar.xz
http://ftp5.gwdg.de/pub/linux/archlinux/testing/os/i686/kmod-4-2-i686.pkg.tar.xz
http://ftp5.gwdg.de/pub/linux/archlinux/core/os/i686/sudo-1.8.3.p2-2-i686.pkg.tar.xzOffline
... xyne-any is up to date archlinuxfr is up to date archstuff is up to date herecura-stable is up to date andrwe is up to date rfad is up to date heftig 2,6 KiB 1436K/s 00:00 [###########################] 100% ...
Off-topic: is there some competition I don't know about to see who runs the most unofficial repos? ![]()
Last edited by tomk (2012-01-31 13:59:43)
Offline
I've got eight more commented out atm.
I'll be doing some cleanup in two days, trying things out, purging unused stuff.
Back on topic: until https://bugs.archlinux.org/task/20683 is fixed, you have to use e.g.
pacman -Su --quiet --print | sed 1,2d > update_listto make it nicely scriptable.
Offline
Alternatively, you can just print the urls and stuff them into a file that you can feed to wget or some other app.
Yeah, that's pretty much how I got the list of packages to download. But I also wanted to make use of aria2c's ability to download from multiple mirrors, have something I can repeat with one command and a script I could easily pass on requiring minimal effort on the part of the recipient.
About the bug, yes, I noticed that. I sed'd the extra line out somewhere...
Offline
This is better suited in Community Contributions. Moving there.
To know or not to know ...
... the questions remain forever.
Offline
Have you seen pacman2aria2 from xyne-any unofficial repo?
[karol@black ~]$ pacman2aria2 -h
USAGE:
pacman -Sp --print-format '%r %l' ... | /usr/bin/pacman2aria2 <reflector options> | aria2c -i - ...
/usr/bin/pacman2aria2 accepts a formatted list of pacman package URLs from STDIN and then uses
Reflector to generate a download list that can be passed to aria2c.
The following help message is directly from Reflector. Most options apply,
including all filtering options.
REFLECTOR HELP MESSAGE
usage: pacman2aria2 [-h] [--list-countries] [--save <filepath>]
[--sort {country,age,rate}] [--threads n] [-a n]
[-c <country>] [-f n] [--grep <regex>] [-l n] [-n n]
[-p <protocol>]
retrieve and filter a list of the latest Arch Linux mirrors
...Offline