You are not logged in.
I found the redownloading all installed packages wiki page, but when I attempt either of the suggested commands on the page, pacman chokes on the first package that I installed out of the AUR. Can someone recommend how I can simply download all of my currently installed packages to my local db?
Thanks!
# pacman -Sdw --noconfirm `pacman -Q | awk '{ print $1 }'`# wget $(pacman -Sdp `pacman -Q | awk '{ print $1 }'`)Last edited by graysky (2009-08-18 19:26:57)
Offline
Hmm... any problems with doing the following:
$ pacman -Q | awk '{ print $1 }' > pkglist
# pacman -Sw `cat pkglist`(credit to timtux in this post).
Last edited by graysky (2009-08-18 19:18:44)
Offline
first,
pacman -Q | awk '{ print $1 }' == pacman -Qq
second,
pacman -Qq | grep -vx "$(pacman -Qqm)" will filter out the foreign (aur) packages
/edit:
personally, i would:
pacman -Qqe | grep -vx "$(pacman -Qqm)" | xargs pacman -Sdw --noconfirm && cp /var/cache/pacman/pkg/* ~/pkg_backups/
Last edited by brisbin33 (2009-08-18 19:48:45)
//github/
Offline
My method chokes on AUR packages and also on groups of packages. I'll give your suggestion a shot.
EDIT: I added your suggestion to the wiki page. Thank you!
Last edited by graysky (2009-08-18 19:26:40)
Offline
EDIT: I added your suggestion to the wiki page. Thank you!
thanks! please test it and let me know if it works. don't really want to do all that downloading to test it myself
.
/edit: added the -d and --noconfirm flags here and in the wiki.
/edit2: just tested (without --noconfirm) and it set up the targets just fine, looks good to me.
Last edited by brisbin33 (2009-08-18 19:50:43)
//github/
Offline
Cool, it needed the noconfirm switch for sure, otherwise it lists all the packages to d/l but drops to a shell prompt. Now I'll just need to modify my backup script for /var to keep my backup set from becoming too large ![]()
tar zcvfp var-arch_backup.tar.gz /var --exclude "/var/cache/pacman/pkg"Last edited by graysky (2009-08-18 19:56:34)
Offline
One question... will that command check the md5sums of the packages in /var/cache/pacman/pkg as well?
Offline
i know nothing of that. my command just downloads fresh *.pkg.tar.gz's of any non-foreign packages you have explicitly installed (as reported by -Qqe). i'm not sure if pacman does integrity checks post-download or pre-install. maybe a pacman dev can answer.
//github/
Offline
I actually think it does... when I use your shell command after all my packages are populated, I get a line that reads, "checking package integrity..." then a fresh shell.
VERIFIED: it does indeed. I removed /var/cache/pacman/pkg/zvbi-0.2.33-1-x86_64.pkg.tar.gz then touched an empty file of the same name. After re-running your command, pacman detected the problem, removed the offending package and re-downloaded when I ran it a second time. Smart ![]()
checking package integrity...
:: File zvbi-0.2.33-1-x86_64.pkg.tar.gz is corrupted. Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package)
zvbi-0.2.33-1-x86_64.pkg.tar.gz is invalid or corrupted
Errors occurred, no packages were upgraded.Last edited by graysky (2009-08-18 21:14:48)
Offline
powerpill -Sdw --noconfirm $(pacpal --list-repo-pkgs)You can also use metapax to rebuild installed packages not available in the repos, e.g. packages from the AUR.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline