Part of canonical.buildd.slave View In Hierarchy
Method | __init__ | Undocumented |
Method | getArch | Return the Architecture tag for the slave. |
Method | cachePath | Return the path in the cache of the file specified. |
Method | setupAuthHandler | Set up a BasicAuthHandler to open the url. |
Method | ensurePresent | Ensure we have the file with the checksum specified. |
Method | storeFile | Take the provided content and store it in the file cache. |
Method | addWaitingFile | Add a file to the cache and store its details for reporting. |
Method | fetchFile | Fetch the file of the given sha1sum. |
Method | abort | Abort the current build. |
Method | clean | Clean up pending files and reset the internal build state. |
Method | log | Write the provided data to the log. |
Method | getLogTail | Return the tail of the log. |
Method | startBuild | Start a build with the provided BuildManager instance. |
Method | emptyLog | Empty the log and start again. |
Method | builderFail | Cease building because the builder has a problem. |
Method | chrootFail | Cease building because the chroot could not be created or contained |
Method | buildFail | Cease building because the package failed to build. |
Method | buildOK | Having passed all possible failure states, mark a build as OK. |
Method | depFail | Cease building due to a dependency issue. |
Method | giveBack | Give-back package due to a transient buildd/archive issue. |
Method | buildComplete | Mark the build as complete and waiting interaction from the build |
Method | sanitizeBuildlog | Removes passwords from buildlog URLs. |
This helper installs a urllib2.HTTPBasicAuthHandler that will deal with any HTTP basic authentication required when opening the URL.
Parameters | url | The URL that needs authenticating. |
username | The username for authentication. | |
password | The password for authentication. | |
Returns | The OpenerDirector instance. |
Optionally you can provide the librarian URL and the build slave will fetch the file if it doesn't have it. Return a tuple containing: (<present>, <info>)
If the buildlog is not yet opened for writing (self._log is None), return a empty string.
It safely tries to open the 'buildlog', if it doesn't exist, due to job cleanup or buildlog sanitization race-conditions, it also returns an empty string.
When the 'buildlog' is present it return up to 2 KiB character of the end of the file.
The returned content will be 'sanitized', see _sanitizeURLs
for
further information.
Because none of the URLs to be processed are expected to span multiple lines and because build log files are potentially huge they will be processed line by line.
Parameters | log_path | The path to the buildlog file that is to be sanitized. (type: str) |