l.s.s.f.SyncSource : class documentation

Part of lp.soyuz.scripts.ftpmaster View In Hierarchy

Sync Source procedure helper class.

It provides the backend for retrieving files from Librarian or the 'sync source' location. Also provides a method to check the downloaded files integrity. 'aptMD5Sum' is provided as a classmethod during the integration time.

Method __init__ Store local context.
Class Method generateMD5Sum Undocumented
Method fetchFileFromLibrarian Fetch file from librarian.
Method fetchLibrarianFiles Try to fetch files from Librarian.
Method fetchSyncFiles Fetch files from the original sync source.
Method checkDownloadedFiles Check md5sum and size match Source.
def __init__(self, files, origin, logger, downloader, todistro):
Store local context.

files: a dictionary where the keys are the filename and the
       value another dictionary with the file informations.
origin: a dictionary similar to 'files' but where the values
        contain information for download files to be synchronized
logger: a logger
downloader: a callable that fetchs URLs,
            'downloader(url, destination)'
todistro: target distribution object
@classmethod
def generateMD5Sum(self, filename):
Undocumented
def fetchFileFromLibrarian(self, filename):
Fetch file from librarian.

Store the contents in local path with the original filename. Return the fetched filename if it was present in Librarian or None if it wasn't.

def fetchLibrarianFiles(self):
Try to fetch files from Librarian.

It raises SyncSourceError if anything else then an orig tarball was found in Librarian. Return the names of the files retrieved from the librarian.

def fetchSyncFiles(self):
Fetch files from the original sync source.

Return DSC filename, which should always come via this path.

def checkDownloadedFiles(self):
Check md5sum and size match Source.

If anything fails SyncSourceError will be raised.

API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.