Package CedarBackup2 :: Module customize
[hide private]
[frames] | no frames]

Module customize

source code

Implements customized behavior.

Some behaviors need to vary when packaged for certain platforms. For instance, while Cedar Backup generally uses cdrecord and mkisofs, Debian ships compatible utilities called wodim and genisoimage. I want there to be one single place where Cedar Backup is patched for Debian, rather than having to maintain a variety of patches in different places.


Author: Kenneth J. Pronovici <pronovic@ieee.org>

Functions [hide private]
 
customizeOverrides(config, platform='standard')
Modify command overrides based on the configured platform.
source code
Variables [hide private]
  logger = <logging.Logger object>
  PLATFORM = 'standard'
  DEBIAN_CDRECORD = '/usr/bin/wodim'
  DEBIAN_MKISOFS = '/usr/bin/genisoimage'
  __package__ = 'CedarBackup2'
Function Details [hide private]

customizeOverrides(config, platform='standard')

source code 

Modify command overrides based on the configured platform.

On some platforms, we want to add command overrides to configuration. Each override will only be added if the configuration does not already contain an override with the same name. That way, the user still has a way to choose their own version of the command if they want.

Parameters:
  • config - Configuration to modify
  • platform - Platform that is in use