This is the default storage module, since its quite compatible with
It’s desirable to be able to create shared hardlinks between the
download directory and the normal repository, and this is facilitated
by making the download directory be a subdirectory of the normal
repository location (ensuring that no mountpoints are crossed).
Shared hardlinks are created by using the rsync –link-dest option.
Since the download is initially unverified, it is safest to save
it in a quarantine directory. The quarantine directory is also
useful for making the repository update more atomic, so that it
less likely that normal repository location will be observed in
a partially synced state.
Run cmd and raise RepoStorageException on failure.
cmd (list) – command to executre
Delete the current update directory. If there was not an update
in progress, or it has already been committed, then this has
Commit the current update directory, so that is becomes the
latest immutable snapshot.
Get the current update directory which would have been returned
from the most recent call to the init_update method. This raises
RepoStorageException if the init_update method has not been
- Return type
path of directory to update
Remove expired snapshots.
Create an update directory as a destination to sync updates to.
The directory will be populated with files from the previous
immutable snapshot, if available. Note that this directory
may contain hardlinks that reference files in the previous
immutable snapshot, so these files should not be modified
(tools like rsync and git normally break hardlinks when
files need to be modified).
- Return type
path of directory to update, populated with files from
the previous snapshot if available