box1: pacman -Qet | awk '{print $1}' >> INSTALLED box 2: (first copy files from /var/cache/pacman/pkg in box1 to box2 and also INSTALLED file) pacman -S $(cat installed) On Wed, Apr 22, 2009 at 1:51 PM, David C. Rankin <drankinatty@xxxxxxxxxxxxxxxxxx> wrote: > Listmates: > > If I want to clone my package selection to another box, is there a better way > to do it other than just parsing the files in /var/cache/pacman/pkg to generate > a list to feed to pacman after install on the second box? Something like: > > for i in $(find /var/cache/pacman/pkg/ -type f); do > TMP=${i##*/} > FILE=${TMP%%-[[:digit:]]*} > echo $FILE >> ~/linux/INSTALLED > done > > Then after install on the new box: > > pacman --sync --refresh > > pacman --sync $( < ~/linux/INSTALLED) > > --or-- > > while read file; do > pacman --sync $file > done < ~/linux/INSTALLED > > I've picked around a bit and can't find a pacman option that is somewhat the > equivalent to rsync's '--files-from' that would allow me to read the list to > pass to pacman directly from a file. I don't know if pacman can do something > like this or how many files it can handle at once if the list of files is piped > or redirected to it. I don't think the second while loop would work either from > a dependency perspective, and, the repeated calls to pacman would make it slow > as hell. > > What's the current thinking on the best way to do something like this? > > > -- > David C. Rankin, J.D.,P.E. > Rankin Law Firm, PLLC > 510 Ochiltree Street > Nacogdoches, Texas 75961 > Telephone: (936) 715-9333 > Facsimile: (936) 715-9339 > www.rankinlawfirm.com >