Package entropy :: Package client :: Module misc :: Class ConfigurationFiles

Class ConfigurationFiles

source code


Configuration Files Updates descriptor.
Each configuration file update action is described
as a mapping between the source file and its destination
target.
Each key (a string representing a source file) points to
a dictionary, containing the following items:
    "destination": path to destination file (string)
    "automerge": if source can be automerged to destination (bool)

This API is process and thread safe with regards to the Installed
Packages Repository. There is no need to do external locking on it.

Instance Methods
new empty dictionary

__init__(self, entropy_client, quiet=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
remove(self, source)
Remove proposed source configuration file.
source code
 
merge(self, source)
Merge proposed source configuration file.
source code
 
exists(self, path)
Return True if path exists.
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Static Methods
 
root()
Return the current ROOT ("/") prefix
source code
Class Variables

Inherited from dict: __hash__

Properties

Inherited from object: __class__

Method Details

__init__(self, entropy_client, quiet=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

remove(self, source)

source code 

Remove proposed source configuration file. "source" must be a key of this dictionary, if not, True is returned. If file pointed at source doesn't exist or removal fails, False is returned.

merge(self, source)

source code 

Merge proposed source configuration file. "source" must be a key of this dictionary, if not, True is returned. If file pointed at source doesn't exist or merge fails, False is returned.

exists(self, path)

source code 

Return True if path exists. This methods automatically appends the ROOT prefix and handles unicode correctly