mini_buildd.api package¶
Submodules¶
mini_buildd.api.client_1_0 module¶
-
class
mini_buildd.api.client_1_0.
Daemon
(host, port=u'8066', proto=u'http', auto_confirm=False, dry_run=False, batch_mode=False, django_mode=True)¶ Bases:
object
-
bulk_migrate
(packages, repositories=None, codenames=None, suites=None)¶ Bulk-migrate a package over repositories, base distributions and suites.
-
call
(command, args=None, output=u'python', raise_on_error=True)¶
-
get_codenames
(repo)¶
-
get_package_versions
(src_package, dist_regex=u'.*')¶ Produce a dict with all (except rollback) available versions of this package (key=distribution, value=info dict: version, dsc_url, log_url, changes_url*).
-
has_package
(distribution, src_package, version=None, or_greater=False)¶ Check if a specific package is in repository.
-
identity
¶ The Archive’s Identity.
-
login
(user=None)¶ Login. Use the user’s mini-buildd keyring for auth, like mini-buildd-tool.
-
repositories
¶
-
status
¶
-
wait_for_package
(distribution, src_package, version=None, or_greater=False, max_tries=-1, sleep=60, initial_sleep=0, raise_on_error=True)¶ Block until a specific package is in repository.
-
Module contents¶
-
class
mini_buildd.api.
Command
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
object
-
ADMIN
= 3¶
-
ARGUMENTS
= []¶
-
AUTH
= 0¶
-
COMMAND
= None¶
-
COMMON_ARG_OPTIONS
= ([u'--options', u'-O'], {u'action': u'store', u'default': u'ignore-lintian=true', u'metavar': u'OPTIONS', u'help': u"upload options (see user manual); separate multiple options by '|'"})¶
-
COMMON_ARG_VERSION
= ([u'--version', u'-V'], {u'action': u'store', u'default': u'', u'metavar': u'VERSION', u'help': u'\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'})¶
-
CONFIRM
= False¶
-
LOGIN
= 1¶
-
NEEDS_RUNNING_DAEMON
= False¶
-
NONE
= 0¶
-
STAFF
= 2¶
-
arg_false2none
(key)¶
-
classmethod
docstring
()¶
-
classmethod
get_default_args
()¶
-
has_flag
(flag)¶
-
-
class
mini_buildd.api.
GetDputConf
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Get recommended dput config snippet.
Usually, this is for integration in your personal ~/.dput.cf.
-
COMMAND
= u'getdputconf'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
GetKey
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Get GnuPG public key.
-
COMMAND
= u'getkey'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
GetSourcesList
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Get sources.list (apt lines).
Usually, this output is put to a file like ‘/etc/sources.list.d/mini-buildd-xyz.list’.
-
ARGUMENTS
= [([u'codename'], {u'help': u'codename (base distribution) to get apt lines for'}), ([u'--repository', u'-R'], {u'action': u'store', u'default': u'.*', u'metavar': u'REPO', u'help': u'repository name regex.'}), ([u'--suite', u'-S'], {u'action': u'store', u'default': u'.*', u'metavar': u'SUITE', u'help': u'suite name regex.'}), ([u'--with-deb-src', u'-s'], {u'action': u'store_true', u'default': False, u'help': u'also list deb-src apt lines.'}), ([u'--with-extra-sources', u'-x'], {u'action': u'store_true', u'default': False, u'help': u'also list extra sources needed.'})]¶
-
COMMAND
= u'getsourceslist'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
List
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
List packages matching a shell-like glob pattern; matches both source and binary package names.
-
ARGUMENTS
= [([u'pattern'], {u'help': u'limit packages by name (glob pattern)'}), ([u'--with-rollbacks', u'-r'], {u'action': u'store_true', u'default': False, u'help': u'also list packages on rollback distributions'}), ([u'--distribution', u'-D'], {u'action': u'store', u'default': u'', u'metavar': u'DIST', u'help': u'limit distributions by name (regex)'}), ([u'--type', u'-T'], {u'action': u'store', u'default': u'', u'metavar': u'TYPE', u'help': u'package type: dsc, deb or udeb (like reprepo --type)'})]¶
-
AUTH
= 1¶
-
COMMAND
= u'list'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
LogCat
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Cat last n lines of the mini-buildd’s log.
-
ARGUMENTS
= [([u'--lines', u'-n'], {u'action': u'store', u'default': 500, u'type': <type 'int'>, u'metavar': u'N', u'help': u'cat (approx.) the last N lines'})]¶
-
AUTH
= 2¶
-
COMMAND
= u'logcat'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Meta
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Call arbitrary meta functions for models; usually for internal use only.
-
ARGUMENTS
= [([u'model'], {u'help': u"Model path, for example 'source.Archive'"}), ([u'function'], {u'help': u"Meta function to call, for example 'add_from_sources_list'"})]¶
-
AUTH
= 3¶
-
COMMAND
= u'meta'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Migrate
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Migrate a source package (along with all binary packages).
-
ARGUMENTS
= [([u'package'], {u'help': u'source package name'}), ([u'distribution'], {u'help': u"distribution to migrate from (if this is a '-rollbackN' distribution, this will perform a rollback restore)"}), ([u'--version', u'-V'], {u'action': u'store', u'default': u'', u'metavar': u'VERSION', u'help': u'\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'})]¶
-
AUTH
= 2¶
-
COMMAND
= u'migrate'¶
-
CONFIRM
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Port
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Port an internal package.
An internal ‘port’ is a no-changes (i.e., only the changelog will be adapted) rebuild of the given locally-installed package.
-
ARGUMENTS
= [([u'package'], {u'help': u'source package name'}), ([u'from_distribution'], {u'help': u'distribution to port from'}), ([u'to_distributions'], {u'help': u'comma-separated list of distributions to port to (when this equals the from-distribution, a rebuild will be done)'}), ([u'--version', u'-V'], {u'action': u'store', u'default': u'', u'metavar': u'VERSION', u'help': u'\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'}), ([u'--options', u'-O'], {u'action': u'store', u'default': u'ignore-lintian=true', u'metavar': u'OPTIONS', u'help': u"upload options (see user manual); separate multiple options by '|'"})]¶
-
AUTH
= 2¶
-
COMMAND
= u'port'¶
-
CONFIRM
= True¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
PortExt
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Port an external package.
An external ‘port’ is a no-changes (i.e., only the changelog will be adapted) rebuild of any given source package.
-
ARGUMENTS
= [([u'dsc'], {u'help': u'URL of any Debian source package (dsc) to port'}), ([u'distributions'], {u'help': u'comma-separated list of distributions to port to'}), ([u'--options', u'-O'], {u'action': u'store', u'default': u'ignore-lintian=true', u'metavar': u'OPTIONS', u'help': u"upload options (see user manual); separate multiple options by '|'"})]¶
-
AUTH
= 2¶
-
COMMAND
= u'portext'¶
-
CONFIRM
= True¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
PrintUploaders
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Print all GPG ids allowed to upload to repositories.
-
ARGUMENTS
= [([u'--repository', u'-R'], {u'action': u'store', u'default': u'.*', u'metavar': u'REPO', u'help': u'repository name regex.'})]¶
-
AUTH
= 3¶
-
COMMAND
= u'printuploaders'¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Remove
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Remove a source package (along with all binary packages).
-
ARGUMENTS
= [([u'package'], {u'help': u'source package name'}), ([u'distribution'], {u'help': u'distribution to remove from'}), ([u'--version', u'-V'], {u'action': u'store', u'default': u'', u'metavar': u'VERSION', u'help': u'\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'})]¶
-
AUTH
= 3¶
-
COMMAND
= u'remove'¶
-
CONFIRM
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Retry
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Retry a previously failed package.
-
ARGUMENTS
= [([u'package'], {u'help': u'source package name'}), ([u'version'], {u'help': u"source package's version"}), ([u'--repository', u'-R'], {u'action': u'store', u'default': u'*', u'metavar': u'REPO', u'help': u'Repository name -- use only in case of multiple matches.'})]¶
-
AUTH
= 2¶
-
COMMAND
= u'retry'¶
-
CONFIRM
= True¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
SetUserKey
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Set a user’s GnuPG public key.
-
ARGUMENTS
= [([u'key'], {u'help': u'GnuPG public key; multiline inputs will be handled as ascii armored full key, one-liners as key ids'})]¶
-
AUTH
= 1¶
-
COMMAND
= u'setuserkey'¶
-
CONFIRM
= True¶
-
run
(_daemon)¶
-
-
class
mini_buildd.api.
Show
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Show a source package.
-
ARGUMENTS
= [([u'package'], {u'help': u'source package name'}), ([u'--verbose', u'-v'], {u'action': u'store_true', u'default': False, u'help': u'verbose output'})]¶
-
COMMAND
= u'show'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Start
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Start the Daemon (engine).
-
ARGUMENTS
= [([u'--force-check', u'-C'], {u'action': u'store_true', u'default': False, u'help': u'run checks on instances even if already checked.'})]¶
-
AUTH
= 3¶
-
COMMAND
= u'start'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Status
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Show the status of the mini-buildd instance.
-
COMMAND
= u'status'¶
-
chroots_str
()¶
-
has_chroot
(codename, arch)¶
-
repositories_str
()¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Stop
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Stop the Daemon (engine).
-
ARGUMENTS
= []¶
-
AUTH
= 3¶
-
COMMAND
= u'stop'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Subscription
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Manage subscriptions to package notifications.
A package subscription is a tuple ‘PACKAGE:DISTRIBUTION’, where both PACKAGE or DISTRIBUTION may be empty to denote all resp. items.
-
ARGUMENTS
= [([u'action'], {u'help': u'action to run', u'choices': [u'list', u'add', u'remove']}), ([u'subscription'], {u'help': u'subscription pattern'})]¶
-
AUTH
= 1¶
-
COMMAND
= u'subscription'¶
-
run
(daemon)¶
-
-
mini_buildd.api.
cls
¶ alias of
Subscription
-
mini_buildd.api.
django_pseudo_configure
()¶