You are not logged in.
hi,
I'd like to know how to redownload (without install) all my installed packages, I've found this:
http://bbs.archlinux.org/viewtopic.php?id=18728
and tried the script:
for package in `pacman -Q | awk '{ print $1 }'`; do yes | pacman -Sw $package; donebut it doesn't download anything in my pacman cache...
the thread is old (2006) and I'm sure there have been a lot of modifications in pacman, so can someone help me correcting that script?
thanks for your help
_Marco_
Offline
pacman -Sw $(pacman -Q | cut -f1 -d' ')Edit: that will run into problems if you have packages installed from outside the main repos (e.g. from the AUR)
You can always do this by
pacman -Q | cut -f1 -d' ' > packages.txt
pacman -Sw $(cat packages.txt)and remove the offending packages from packages.txt as pacman fails.
Last edited by Allan (2008-05-05 12:43:22)
Offline
wow, thank you very much for the really fast reply ![]()
I'm try it now
thanks
Offline
uhm.. there is a problem...
if it find a package that is not in the official repos (example built with AUR) it returns an error and exits.
any idea?
Offline
Offline
ok I'll try, thanks for the help!
Offline
pacman -Sc --noconfirm
pacman -Q | awk '{print $1}' > /tmp/lista
pacman -Qm | awk '{print $1}' > /tmp/washones
if [ -n "`cat /tmp/washones`" ];
then
for washon in `cat /tmp/washones`
do
cat /tmp/lista | grep -v -i $washon > /tmp/lista.filtro
mv /tmp/lista.filtro /tmp/lista
done
fi
pacman -Sdw --noconfirm `cat /tmp/lista`
rm /tmp/lista /tmp/washones
echo "oko"That's my approach to solve that problem
They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.
Offline
wow, really impressive ![]()
I'll give it a try as soon as possible
Thanks
Offline
This works for me:
pacman -Sw $(pacman -Qq | grep -v "$(pacman -Qmq)")pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
shining Thanks, I must tell you that I spent "some" time to understand your script ![]()
Offline
I'm ashamed to say I did not know the "pacman -Qq" option... I can forget about cut forever more!
Offline
@shining: die! ![]()
You made my "poetry" worth crap.
T_T
Those were completly different approaches... The very long one, and the arch one...
I feel despicable... I'm going to commit suicide... No one try to stop me! I'm going to jump to /dev/null!!
They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.
Offline
I'm ashamed to say I did not know the "pacman -Qq" option... I can forget about cut forever more!
Well, that --quiet option is practical indeed; but what about the power of combining unix tools together? ![]()
cut is still a nice and neat tool to use, so no problem.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
You made my "poetry" worth crap.
Those were completely different approaches... The very long one, and the arch one...
You can start by writing a long approach that works, and then try to find a more elegant one, no problem with that.
But generally speaking, it's very easy to write a script longer than necessary, because writing short ones require both knowledge
of all the neat tools like grep,sed,cut,tr,find, etc and experience of combining them all together.
To be honest, this need of reinstalling or re-downloading all installed packages comes up regularly, so you can find that my solution
was already suggested before in this forum, but that there were also several more verbose solutions similar to yours.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline