portage.sync.modules.rsync.rsync module

class portage.sync.modules.rsync.rsync.RsyncSync

Bases: portage.sync.syncbase.NewBase

Rsync sync module

_do_rsync(syncuri, timestamp, opts)

Return a retry decorator, or None if retry is disabled.

If retry fails, the function reraises the exception raised by the decorated function. If retry times out and no exception is available to reraise, the function raises TimeoutError.


Sets internal variables from kwargs

_process_exitcode(exitcode, syncuri, out, maxretries)

Refresh keys stored in openpgp_env. Raises gemato.exceptions.GematoException or asyncio.TimeoutError on failure.


openpgp_env (gemato.openpgp.OpenPGPEnvironment) – openpgp environment

static _rsync_opts_extend(opts, rsync_opts)

Select an appropriate implementation of RepoStorageInterface, based on repos.conf settings.

Return type



name of the selected repo storage constructor

_validate_rsync_opts(rsync_opts, syncuri)
property download_dir

Get the path of the download directory, where the repository update is staged. The directory is initialized lazily, since the repository might already be at the latest revision, and there may be some cost associated with the directory initialization.


Tests whether the repo actually exists

property has_bin

Checks for existance of the external binary, and also checks for storage driver configuration problems.

MUST only be called after _kwargs() has set the logger

static name()

Do the initial download and install of the repository

post_sync(portdb, location, emerge_config)

repo.sync_type == “Blank”: # NOTE: Do this after reloading the config, in case # it did not exist prior to sync, so that the config # and portdb properly account for its existence.

property repo_storage

Get the repo storage driver instance. Raise RepoStorageException if there is a configuration problem


Get information about the head commit

short_desc = 'Perform sync operations on rsync based repositories'

Sync the repository


Internal update function which performs the transfer