You are not logged in.
I want to only download the latest package versions from the archlinux ftp site. So when doing a listing I get something like:
---
xfsprogs-2.6.25-1.pkg.tar.gz
xfsprogs-2.6.36-1.pkg.tar.gz
xfsprogs-2.6.36-2.pkg.tar.gz
xine-lib-1.0-1.pkg.tar.gz
xine-lib-1.0.1-1.pkg.tar.gz
xine-lib-1.1.0-1.pkg.tar.gz
xine-lib-1.1.0-3.pkg.tar.gz
xine-ui-0.99.3-2.pkg.tar.gz
xine-ui-0.99.4-1.pkg.tar.gz
---
I only want to dowload the single latest version of each above package. Any idea on how to do this?
Offline
Just type this, it'll find the latest, then download it and install it for you.
pacman -S xine-lib
If it doesn't work, post the contents of your /etc/pacman.conf file and we can help you from there
Offline
Actually the files I listed are not relevant. What I am trying to do is download the entire directory (all of arch linux). But in the dir "/ibiblio/distributions/archlinux/0.8/os/i686" there are multiple copies of each file and I only want to ftp download the latest version of each file.
Any suggestions on how to do this without having to manually select the latest version, etc...
Offline
pacman has a fetch only argument, something like this would work:
for pkg in `pacman -Sl`; do pacman -Sw `echo $pkg | awk '{print $2}'`; done
Now I havn't tested that and I just got home from the pub but something like that should work.
Offline
This short perl-script should do what you want and store the packages in /var/cache/pacman/ so don't forget to clean the cache beforehand.
#!/usr/bin/perl -w
use strict;
my @all = `pacman -Sl`;
#print @all;
my $packages = "";
foreach my $string (@all) {
$string =~ /d*s(S*)s/;
$packages = $packages."$1 ";
}
system "pacman -Sdw $packages";
greetings
Mathias
Offline
... I have to learn perl ...
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
...yeah perl is lovely...
Offline
Cam's one-liner should work the same way as the perl script (though I would have used cut instead of awk, he he)
Offline
there might be differences between the Arch ftp and the local database, synch first
pacman -Sy;for pkg in `pacman -Sl`; do pacman -Sw `echo $pkg | awk '{print $2}'`; done
--(*(cs25x--));
Offline