l.a.s.p.PublishDistro(PublisherScript) : class documentation

Part of lp.archivepublisher.scripts.publishdistro View In Hierarchy

Distro publisher.
Method add_my_options Optionally customize this hook to define your own options.
Method isCareful Is the given "carefulness" option enabled?
Method describeCare Helper: describe carefulness setting of given option.
Method logOption Describe the state of option to the debug log.
Method countExclusiveOptions Return the number of exclusive "mode" options that were set.
Method logOptions Dump the selected options to the debug log.
Method validateOptions Check given options for user interface violations.
Method findSuite Find the named suite in the selected Distribution.
Method findAllowedSuites Find the selected suite(s).
Method findExplicitlyDirtySuites Find the suites that have been explicitly marked as dirty.
Method getCopyArchives Find copy archives for the selected distribution.
Method getPPAs Find private package archives for the selected distribution.
Method getTargetArchives Find the archive(s) selected by the script's options.
Method getPublisher Get a publisher for the given options.
Method deleteArchive Ask publisher to delete archive.
Method publishArchive Ask publisher to publish archive.
Method main See LaunchpadScript.

Inherited from PublisherScript:

Method addDistroOptions Undocumented
Method findSelectedDistro Find the Distribution named by the --distribution option.
Method findDerivedDistros Find all Ubuntu-derived distributions.
Method findDistros Find the selected distribution(s).

Inherited from LaunchpadCronScript (via PublisherScript):

Method __init__ Construct new LaunchpadScript.
Method get_last_activity Return the last activity, if any.
Method record_activity Record the successful completion of the script.

Inherited from LaunchpadScript (via PublisherScript, LaunchpadCronScript):

Method handle_options Undocumented
Method name Enable subclasses to override with command-line arguments.
Method dbuser Enable subclasses to override with command-line arguments.
Method login Super-convenience method that avoids the import.
Method lockfilename Return lockfilename.
Method lockfilepath Undocumented
Method setup_lock Create lockfile.
Method lock_or_die Attempt to lock, and sys.exit(1) if the lock's already taken.
Method unlock Release the lock. Do this before going home.
Method run Actually run the script, executing zcml and initZopeless.
Method lock_and_run Call lock_or_die(), and then run() the script.
Method _init_zca Initialize the ZCA, this can be overridden for testing purposes.
Method _init_db Initialize the database transaction.
def add_my_options(self):

Optionally customize this hook to define your own options.

This method should contain only a set of lines that follow the template:

self.parser.add_option("-f", "--foo", dest="foo",
default="foobar-makes-the-world-go-round", help="You are joking, right?")
def isCareful(self, option):
Is the given "carefulness" option enabled?

Yes if the option is True, but also if the global "careful" option is set.

ParametersoptionThe specific "careful" option to test, e.g. self.options.careful_publishing.
ReturnsWhether the option should be treated as asking us to be careful.
def describeCare(self, option):
Helper: describe carefulness setting of given option.

Produces a human-readable string saying whether the option is set to careful mode; or "overridden" to careful mode by the global "careful" option; or is left in normal mode.

def logOption(self, name, value):
Describe the state of option to the debug log.
def countExclusiveOptions(self):
Return the number of exclusive "mode" options that were set.

In valid use, at most one of them should be set.

def logOptions(self):
Dump the selected options to the debug log.
def validateOptions(self):
Check given options for user interface violations.
def findSuite(self, distribution, suite):
Find the named suite in the selected Distribution.
ParameterssuiteThe suite name to look for.
ReturnsA tuple of distroseries and pocket.
def findAllowedSuites(self, distribution):
Find the selected suite(s).
def findExplicitlyDirtySuites(self, archive):
Find the suites that have been explicitly marked as dirty.
def getCopyArchives(self, distribution):
Find copy archives for the selected distribution.
def getPPAs(self, distribution):
Find private package archives for the selected distribution.
def getTargetArchives(self, distribution):
Find the archive(s) selected by the script's options.
def getPublisher(self, distribution, archive, allowed_suites):
Get a publisher for the given options.
def deleteArchive(self, archive, publisher):
Ask publisher to delete archive.
def publishArchive(self, archive, publisher):
Ask publisher to publish archive.

Commits transactions along the way.

def main(self):
See LaunchpadScript.
API Documentation for Launchpad, generated by pydoctor at 2018-05-24 00:00:11.