l.s.s.f.LpQueryDistro(LaunchpadScript) : class documentation

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

Main class for scripts/ftpmaster-tools/lp-query-distro.py.
Method __init__ Initialise dynamic 'usage' message and LaunchpadScript parent.
Method add_my_options Add 'distribution' and 'suite' context options.
Method main Main procedure, basically a runAction wrapper.
Method defaultPresenter Default result presenter.
Method runAction Run a given initialised action (self.action_name).
Method checkNoSuiteDefined Raises LaunchpadScriptError if a suite location was passed.
Method current Return the name of the CURRENT distroseries.
Method development Return the name of the DEVELOPMENT distroseries.
Method supported Return the names of the distroseries currently supported.
Method pending_suites Return the suite names containing PENDING publication.
Method archs Return a space-separated list of architecture tags.
Method official_archs Return a space-separated list of official architecture tags.
Method nominated_arch_indep Return the nominated arch indep architecture tag.
Method pocket_suffixes Return a space-separated list of non-empty pocket suffixes.
Method _buildLocation Build a PackageLocation object

Inherited from LaunchpadScript:

Method login Super-convenience method that avoids the import.
Method lockfilename Return lockfilename.
Method setup_lock Create lockfile.
Method lock_or_die Attempt to lock, and sys.exit(1) if the lock's already taken.
Method lock_or_quit Attempt to lock, and sys.exit(0) 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 record_activity Hook to record script activity.
Method lock_and_run Call lock_or_die(), and then run() the script.
Method _init_zca Initialize the ZCA, this can be overriden for testing purpose.
Method _init_db Initialize the database transaction.
def __init__(self, *args, **kwargs):
Initialise dynamic 'usage' message and LaunchpadScript parent.

Also initialise the list 'allowed_arguments'.

def add_my_options(self):
Add 'distribution' and 'suite' context options.
def main(self):
Main procedure, basically a runAction wrapper.

Execute the given and allowed action using the default presenter (see self.runAction for further information).

def _buildLocation(self):
Build a PackageLocation object

The location will correspond to the given 'distribution' and 'suite', Any PackageLocationError occurring at this point will be masked into LaunchpadScriptFailure.

def defaultPresenter(self, result):
Default result presenter.

Directly prints result in the standard output (print).

def runAction(self, presenter=None):
Run a given initialised action (self.action_name).

It accepts an optional 'presenter' which will be used to store/present the action result.

Ensure at least one argument was passed, known as 'action'. Verify if the given 'action' is listed as an 'allowed_action'. Raise LaunchpadScriptFailure if those requirements were not accomplished.

It builds context 'location' object (see self._buildLocation).

It may raise LaunchpadScriptFailure is the 'action' is not properly supported by the current code (missing corresponding property).

def checkNoSuiteDefined(self):
Raises LaunchpadScriptError if a suite location was passed.

It is re-used in action properties to avoid conflicting contexts, i.e, passing an arbitrary 'suite' and asking for the CURRENT suite in the context distribution.

@property
def current(self):
Return the name of the CURRENT distroseries.

It is restricted for the context distribution.

It may raise LaunchpadScriptFailure if a suite was passed on the command-line or if not CURRENT distroseries was found.

@property
def development(self):
Return the name of the DEVELOPMENT distroseries.

It is restricted for the context distribution.

It may raise LaunchpadScriptFailure if a suite was passed on the command-line.

Return the first FROZEN distroseries found if there is no DEVELOPMENT one available.

Raises NotFoundError if neither a CURRENT nor a FROZEN candidate could be found.

@property
def supported(self):
Return the names of the distroseries currently supported.

'supported' means not EXPERIMENTAL or OBSOLETE.

It is restricted for the context distribution.

It may raise LaunchpadScriptFailure if a suite was passed on the command-line or if there is not supported distroseries for the distribution given.

Return a space-separated list of distroseries names.

@property
def pending_suites(self):
Return the suite names containing PENDING publication.

It check for sources and/or binary publications.

@property
def archs(self):
Return a space-separated list of architecture tags.

It is restricted for the context distribution and suite.

@property
def official_archs(self):
Return a space-separated list of official architecture tags.

It is restricted to the context distribution and suite.

@property
def nominated_arch_indep(self):
Return the nominated arch indep architecture tag.

It is restricted to the context distribution and suite.

@property
def pocket_suffixes(self):
Return a space-separated list of non-empty pocket suffixes.

The RELEASE pocket (whose suffix is the empty string) is omitted.

The returned space-separated string is ordered alphabetically.

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