Part of lp.soyuz.tests.fakepackager View In Hierarchy
It uses a series of templates to build controllable sources to be used in Soyuz tests.
Method | __init__ | Create a 'sandbox' directory. |
Method | buildUpstream | Build a fake source upstream version. |
Method | buildVersion | Initialize a new version of extracted package. |
Method | buildSource | Build a new version of the source package. |
Method | listAvailableUploads | Return the path for all available changesfiles. |
Method | uploadSourceVersion | Upload and publish a source package from the sandbox directory. |
Method | _createNewSandbox | Create the 'sandbox' path as a temporary directory. |
Method | _importGPGKey | Import the given secret GPG key to sign packages. |
Method | _appendContents | Append a given content in the upstream 'contents' file. |
Method | _buildOrig | Build a gzip tarball of the current 'upstream_directory'. |
Method | _createFile | Create a file in the given path with the given content. |
Method | _populateChangelog | Create an empty debian/changelog |
Method | _populateControl | Create the debian/control using 'control_file_template'. |
Method | _populateCopyright | Create a placeholder debian/copyright. |
Method | _populateRules | Create the debian/rules using 'rules_file_template'. |
Method | _populateDebian | Create and populate a minimal debian directory. |
Method | _prependChangelogEntry | Prepend a changelog entry in the current upstream directory. |
Method | _runSubProcess | Run the given script and collects STDOUT and STDERR. |
Method | _getChangefilePathForVersion | Return the changesfile path for a given (version, type). |
Method | _doUpload | Upload a given version. |
Also register an atexit handler to remove it on normal termination.
Return the fingerprint of the imported key, prefixed with '0x'.
Use this method to add arbitrary content to this non-debian file.
The tarball will be named 'name_version.orig.tar.gz' and located at the sandbox root.
A new line is appended at the end of the file.
Raises | AssertionError | If the script returns a non-Zero value. |
'type' defaults to 'source' but can also be a architecturetag for binary uploads. It respects the context 'name'.
Return None if the specified upload could not be found.
Raises an error if the version couldn't be found or the upload was rejected.
Build a upload policy with the given name and override it with archive, distribution_name and suite if passed.
Return the corresponding NascentUpload
object.
This method should only be called once for a given upstream-{name, version}.
Parameters | build_orig | boolean indicating whether or not to prepare a orig.tar.gz containing the pristine upstream code. If generated it can be used for subsequent versions. |
Raises | AssertionError | if there is already a upstream directory for the context upstream-{name, version}. |
Parameters | include_orig | boolean, controls whether or not the upstream tarball should be included in the changesfile. |
signed | whether or not to build a signed package. | |
Raises | AssertionError | if the upstream directory is not available or if no GPG key was imported by this object. |
See _doUpload
.
If 'auto_accept' is true, accept the upload if necessary and return
the corresponding ISourcePackagePublishingHistory
record. Otherwise
return the corresponding NascentUpload
object.