Syncers

Overview

Paludis makes use of scripts called 'syncers' to perform certain sync actions (e.g. handling paludis --sync for e format repositories). Some syncers support additional options that can be set via the sync_options repository configuration key. Syncers can be added for additional protocols (for example, if you need to use a repository that uses a weird version control system), and built-in syncers can be replaced (for example, if you want to use a non-standard program).

The syncer protocol used by Paludis is not always identical to the one used by the syncing program. In particular, several syncing programs support URIs in the form http://, and Paludis would not be able to tell whether such a URI should be synced by, say, Subversion, Git or Darcs. Instead, you must use svn+http:// and so on.

Standard Syncers

Paludis ships with the following sync protocols (you can use cave print-sync-protocols and cave sync-protocol-options to get the list yourself). Note that many of these syncers depend upon external programs that are not listed as dependencies for Paludis.

###SYNCERS###

User Defined Syncers

To write your own syncer for protocol proto, create an executable script named doproto (the do prefix is essential) and place it in SHAREDIR/paludis/syncers/, where SHAREDIR is probably /usr/share. This directory has priority over the usual Paludis syncer locations, so it can be used to override existing syncers as well as creating new ones.

A syncer script can be called in two ways:

Many syncers use source "${PALUDIS_EBUILD_DIR}/echo_functions.bash" early on to get access to ewarn and friends.

For examples, consult the built-in syncers, which can be found in LIBEXECDIR/paludis/syncers/.