l.a.d.DistUpgraderUpload(CustomUpload) : class documentation

Part of lp.archivepublisher.dist_upgrader View In Hierarchy

Dist Upgrader custom upload processor.

Dist-Upgrader is a tarball containing files for performing automatic distroseries upgrades, driven by architecture.

The tarball filename must be of the form:

<NAME>_<VERSION>_<ARCH>.tar.gz

where:

and should contain:

Dist-Upgrader versions are published under:

<ARCHIVE>/dists/<SUITE>/main/dist-upgrader-<ARCH>/<VERSION>/

A 'current' symbolic link points to the most recent version.

Static Method parsePath Parse tarfile_path, returning its useful components.
Method setComponents Set instance variables based on decomposing the filename.
Method setTargetDirectory Set self.targetdir based on parameters.
Class Method getSeriesKey Get a unique key for instances of this custom upload type.
Method shouldInstall Install files from a dist-upgrader tarball.
Method shouldSign Sign *.tar.gz files.

Inherited from CustomUpload:

Class Method publish See ICustomUploadHandler.
Method __init__ Undocumented
Method process Process the upload and install it into the archive.
Method checkForConflicts Check for conflicts with existing publications in the archive.
Method verifyBeforeExtracting Verify the tarball before extracting it.
Method extract Extract the custom upload to a temporary directory.
Method ensurePath Ensure the parent directory exists.
Method sign Sign a file.
Method installFiles Install the files from the custom upload to the archive.
Method fixCurrentSymlink Update the 'current' symlink and prune old entries.
Method cleanup Clean up the temporary directory
Method _buildInstallPaths Build and return paths used to install files.
@staticmethod
def parsePath(tarfile_path):
Parse tarfile_path, returning its useful components.
RaisesValueErrorIf tarfile_path is incorrectly formed.
def setComponents(self, tarfile_path):
Set instance variables based on decomposing the filename.
def setTargetDirectory(self, archive, tarfile_path, suite):
Set self.targetdir based on parameters.

This should also set self.version and self.arch (if applicable) as a side-effect.

@classmethod
def getSeriesKey(cls, tarfile_path):
Get a unique key for instances of this custom upload type.

The key should differ for any uploads that may be published simultaneously, but should be identical for (e.g.) different versions of the same type of upload on the same architecture in the same series. Returns None on failure to parse tarfile_path.

def shouldInstall(self, filename):
Install files from a dist-upgrader tarball.

It raises DistUpgraderBadVersion if if finds a directory name that could not be treated as a valid Debian version.

It returns False for extracted contents of a directory named 'current' (since it would obviously conflict with the symbolic link in the archive).

Return True for contents of 'versionable' directories.

def shouldSign(self, filename):
Sign *.tar.gz files.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.