You are not logged in.

#1 2008-02-11 21:46:18

LTSmash
Member
From: Aguascalientes - Mexico
Registered: 2008-01-02
Posts: 348
Website

Sharing pacman cache in same machine between different Arch installs

How may I ask?


Proud Ex-Arch user.
Still an ArchLinux lover though.

Currently on Kubuntu 9.10

Offline

#2 2008-02-11 21:58:59

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Sharing pacman cache in same machine between different Arch installs

This is how I do that!

Download pacman packages into a cachedir located in a flash drive.  Package the individual packages with depends in the flash drive such that they will be installed fully.

The cache is then accessed with pacman to install the selected package.

The parameters are:

  pacman --cachedir /media/disk/upgrade -Sw (package name(s))

This places the .pkg.tar.gz into /media/disk/upgrade.  At this point, gather the elements of the depends and package into a folder with an ID such as open-office1.  Difficult to explain for all packages because some are not includiing depends!

   Then to install at your convenience,;

     pacman -Ud /media/disk/upgrade/open-office1/*.pkg.tar.gz.........

This will install the packages contained in open-office1 at 15-20MB/sec.

This can be portable via the flash device.

Hope it fills your needs.................

EDIT: Normal pacman downloads can still be handled via ...pacman -S package name because the cachedir is not imposed.

EDIT:  You could copy the entire /var/cache/pacman/pkg into the cachedir if desired altho the depends may not be available therein , so the method I described may be best.

Last edited by lilsirecho (2008-02-11 22:05:47)


My ailment? Lackatesla!
Tesla fails smog test..no gas!
Favorite song...Tesla On My Mind....

Offline

#3 2008-02-11 23:09:48

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: Sharing pacman cache in same machine between different Arch installs

As an additional note, pacman (as of 3.1.X) now supports multiple cache directories, which can be really helpful in situations like this. These can either be specified on the command line (as above) or in /etc/pacman.conf (read the pacman.conf(5) manpage for details).

As an example, on my two machines, I mount the pacman caches of the other machine at an accessible location over NFS (using sshfs w/ FUSE is a good choice too) and specify the following in my pacman.conf:

CacheDir = /var/cache/pacman/pkg
CacheDir = /mnt/corkcache

This tells pacman to first search my local cache for a package, then the remote cache, then it will download it if it is in neither to the first cache location. I can set up a mirrored setup on my other machine and then I know I am never downloading a package more than once.

Offline

Board footer

Powered by FluxBB