Making and using snapshots


In Pacman 3, you can freeze any cache into a self contained machine independent "snapshot" which is itself also a cache. To see why you might want to do this, let's see some examples.

Go to a fresh working area and do

% pacman -snap BU
This may take a little while to do all the downloads, but when it's done, you will find a snapshot file in your current working directory. This file is a self contained capture of the BU cache including all of the Pacman source code and with all of the potential downloads resolved. Copy this file someplace such as ~MyName/foo.snap. You can rename the file as long as you keep the .snap as a suffix. Snapshots are caches in every sense, so you can do
% pacman -lc ~MyName/foo.snap
or
% pacman -get ~MyName/foo.snap:Python
include the snapshot in caches lists, etc.

Because installations are caches too, you can make snapshots from any software environment that you can fetch. For example, do

% pacman -fetch BU:Python BU:nEdit Pacman:Pacman
% pacman -snap .
Because fetching resolves all dependencies a snapshot made this way is guaranteed to be completely self contained (as long as all downloads are expressed in the Pacman language, of course).

Note that unlike the fetch example, the first example is not guaranteed to produce a self contained snapshot because the BU cache may not contain all of it's dependents. This feature let's you handle situations where you want to snapshot small caches without pulling in all potential downloads every time.


Pacman Headquarters