models Package¶
models
Package¶
Django modules package.
All models must provide a an admin meta class as ‘Model.Admin’.
-
mini_buildd.models.
import_all
()¶ Call this after your django app is configured.
base
Module¶
Generic module for models of the django app mini_buildd.
Naming conventions¶
Model class and field names¶
All model class names and all field names must be human readable with no abbrevations (as django, per default, displays the internal names intelligently to the end user).
Model class names must be in CamelCase.
Field names must be all lowercase and seperatedy by underscores.
For example, don’t try to do sort of “grouping” using names like:
email_notify
email_allow_regex
This should rather read:
notify
allow_emails_to
To group fields together for the end user, use AdminModel’s fieldset option.
Methods¶
Methods that represent mini-buildd logic should go into the models directly, but must be prefixed with “mbd_”. This avoids conflicts with method names form the django model’s class, but still keeps the logic where it belongs.
-
class
mini_buildd.models.base.
Model
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Abstract father model for all mini-buildd models.
This just makes sure no config is changed or deleted while the daemon is running.
-
class
Admin
(model, admin_site)¶ Bases:
django.contrib.admin.options.ModelAdmin
-
delete_model
(request, obj)¶
-
mbd_model
¶ alias of
Subscription
-
media
¶
-
save_model
(request, obj, form, change)¶
-
-
classmethod
Model.
mbd_get_daemon
()¶
-
Model.
mbd_get_dependencies
()¶
-
Model.
mbd_get_extra_option
(key, default=None)¶
-
Model.
mbd_get_extra_options
()¶
-
classmethod
Model.
mbd_get_or_create
(msglog, **kwargs)¶ Like get_or_create, but adds a info message.
-
Model.
mbd_get_pickled_data
(default=None)¶
-
Model.
mbd_get_reverse_dependencies
()¶
-
Model.
mbd_set_pickled_data
(data)¶
-
Model.
mbd_set_pickled_data_pickled
(pickled_data)¶
-
classmethod
Model.
mbd_validate_regex
(regex, value, field_name)¶
-
class
-
class
mini_buildd.models.base.
StatusModel
(*args, **kwargs)¶ Bases:
mini_buildd.models.base.Model
Abstract model class for all models that carry a status. See Manual: Configuration.
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
actions
= [<function mbd_action_prepare at 0x7f87e47f5b90>, <function mbd_action_check at 0x7f87e47f5c08>, <function mbd_action_pc at 0x7f87e47f5de8>, <function mbd_action_activate at 0x7f87e47f5c80>, <function mbd_action_pca at 0x7f87e47f5e60>, <function mbd_action_deactivate at 0x7f87e47f5cf8>, <function mbd_action_remove at 0x7f87e47f5d70>]¶
-
colored_status
(obj)¶
-
list_display
= [u'colored_status', u'__unicode__']¶
-
list_display_links
= [u'__unicode__']¶
-
classmethod
mbd_action
(request, queryset, action, **kwargs)¶ Try to run action on each object in queryset, emit error message on failure, but don’t fail ourself.
-
mbd_action_activate
(request, queryset)¶
-
mbd_action_check
(request, queryset)¶
-
mbd_action_deactivate
(request, queryset)¶
-
mbd_action_pc
(request, queryset)¶
-
mbd_action_pca
(request, queryset)¶
-
mbd_action_prepare
(request, queryset)¶
-
mbd_action_remove
(request, queryset)¶
-
classmethod
mbd_activate
(request, obj)¶
-
classmethod
mbd_check
(request, obj, force=False, needs_activation=False)¶
-
classmethod
mbd_deactivate
(request, obj)¶
-
classmethod
mbd_meta_pca_all
(msglog)¶ Run prepare, check, and activate for all objects of this model
-
classmethod
mbd_prepare
(request, obj)¶
-
classmethod
mbd_remove
(request, obj)¶
-
media
¶
-
save_model
(request, obj, form, change)¶
-
-
StatusModel.
CHECK_CHANGED
= datetime.datetime(1, 1, 2, 0, 0)¶
-
StatusModel.
CHECK_FAILED
= datetime.datetime(1, 1, 3, 0, 0)¶
-
StatusModel.
CHECK_NONE
= datetime.datetime(1, 1, 1, 0, 0)¶
-
StatusModel.
CHECK_REACTIVATE
= datetime.datetime(1, 1, 4, 0, 0)¶
-
StatusModel.
CHECK_STRINGS
= {datetime.datetime(1, 1, 4, 0, 0): {u'char': u'A', u'string': u'Failed in active state -- will auto-activate when check succeeds again'}, datetime.datetime(1, 1, 1, 0, 0): {u'char': u'-', u'string': u'Unchecked -- please run check'}, datetime.datetime(1, 1, 2, 0, 0): {u'char': u'*', u'string': u'Changed -- please prepare again'}, datetime.datetime(1, 1, 3, 0, 0): {u'char': u'x', u'string': u'Failed -- please fix and check again'}}¶
-
StatusModel.
LETHAL_DEPENDENCIES
= True¶
-
StatusModel.
STATUS_ACTIVE
= 2¶
-
StatusModel.
STATUS_CHOICES
= ((0, u'Removed'), (1, u'Prepared'), (2, u'Active'))¶
-
StatusModel.
STATUS_COLORS
= {0: {u'bg': u'red', u'fg': u'black'}, 1: {u'bg': u'yellow', u'fg': u'black'}, 2: {u'bg': u'green', u'fg': u'white'}}¶
-
StatusModel.
STATUS_PREPARED
= 1¶
-
StatusModel.
STATUS_REMOVED
= 0¶
-
StatusModel.
days_until_recheck
¶ Field temporarily implemented as extra_option.
Note
Currently using 6 days as default value – as it copes better with the current setup to restart mini-buildd weekly (via cron.weekly) to actually achieve automated checking.
-
StatusModel.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
StatusModel.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
StatusModel.
get_status_display
(*moreargs, **morekwargs)¶
-
classmethod
StatusModel.
mbd_get_active
()¶
-
classmethod
StatusModel.
mbd_get_active_or_auto_reactivate
()¶
-
StatusModel.
mbd_get_check_display
(typ=u'string')¶
-
classmethod
StatusModel.
mbd_get_prepared
()¶
-
StatusModel.
mbd_get_status_display
(typ=u'string')¶
-
StatusModel.
mbd_is_active
()¶
-
StatusModel.
mbd_is_changed
()¶
-
StatusModel.
mbd_is_checked
()¶
-
StatusModel.
mbd_is_prepared
()¶
-
StatusModel.
mbd_needs_check
()¶
-
StatusModel.
mbd_set_changed
(request)¶
-
class
chroot
Module¶
-
class
mini_buildd.models.chroot.
Chroot
(id, extra_options, pickled_data, status, last_checked, auto_reactivate, source, architecture, personality, personality_override)¶ Bases:
mini_buildd.models.base.StatusModel
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
fieldsets
= [(u'Chroot identity', {u'fields': ((u'source', u'architecture'), u'personality', u'personality_override')}), (u'Extra options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u'\n<b>Supported extra options</b>\n<p><tt>Debootstrap-Command: ALT_COMMAND</tt>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <tt>Debootstrap-Command: /usr/sbin/qemu-debootstrap</tt> may be used to produce <em>armel</em>\nchroots (with <tt>qemu-user-static</tt> installed).\n</p>\n'})]¶
-
get_readonly_fields
(_request, obj=None)¶ Forbid change source/arch on existing chroot (we would loose the path to the associated data).
-
classmethod
mbd_host_architecture
()¶
-
media
¶
-
readonly_fields
= [u'personality']¶
-
search_fields
= [u'source', u'architecture']¶
-
-
exception
Chroot.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Chroot.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Chroot.
PERSONALITIES
= {u'i386': u'linux32'}¶
-
Chroot.
architecture
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Chroot.
dirchroot
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
place.restaurant
is aReverseOneToOneDescriptor
instance.
-
Chroot.
filechroot
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
place.restaurant
is aReverseOneToOneDescriptor
instance.
-
Chroot.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
Chroot.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
Chroot.
get_status_display
(*moreargs, **morekwargs)¶
-
Chroot.
lvmchroot
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
place.restaurant
is aReverseOneToOneDescriptor
instance.
-
Chroot.
mbd_backend_check
(request)¶ Subclasses may implement this to do extra backend checks.
-
Chroot.
mbd_check
(request)¶
-
Chroot.
mbd_check_sudo_workaround
(request)¶ mini-buildd <= 1.0.4 created chroots with a “sudo workaround” for bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607228.
Suche chroots must be recreated, and no longer used.
-
Chroot.
mbd_get_backend
()¶
-
Chroot.
mbd_get_dependencies
()¶
-
Chroot.
mbd_get_keyring_file
()¶ Holds all keys from the source to verify the release via debootstrap’s –keyring option.
-
Chroot.
mbd_get_name
()¶
-
Chroot.
mbd_get_path
()¶
-
Chroot.
mbd_get_pre_sequence
()¶ Subclasses may implement this to do define an extra preliminary sequence.
-
Chroot.
mbd_get_schroot_conf_file
()¶
-
Chroot.
mbd_get_sequence
()¶
-
Chroot.
mbd_get_system_schroot_conf_file
()¶
-
Chroot.
mbd_get_tmp_dir
()¶
-
Chroot.
mbd_prepare
(request)¶
-
Chroot.
mbd_remove
(request)¶
-
Chroot.
mbd_sync
(request)¶
-
Chroot.
objects
= <django.db.models.manager.Manager object>¶
-
Chroot.
source
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
class
-
class
mini_buildd.models.chroot.
DirChroot
(*args, **kwargs)¶ Bases:
mini_buildd.models.chroot.Chroot
Dir chroot backend.
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.chroot.Admin
-
fieldsets
= [(u'Chroot identity', {u'fields': ((u'source', u'architecture'), u'personality', u'personality_override')}), (u'Extra options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u'\n<b>Supported extra options</b>\n<p><tt>Debootstrap-Command: ALT_COMMAND</tt>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <tt>Debootstrap-Command: /usr/sbin/qemu-debootstrap</tt> may be used to produce <em>armel</em>\nchroots (with <tt>qemu-user-static</tt> installed).\n</p>\n'}), (u'Dir options', {u'fields': (u'union_type',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
media
¶
-
-
exception
DirChroot.
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
DirChroot.
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.chroot.MultipleObjectsReturned
-
DirChroot.
UNION_AUFS
= 0¶
-
DirChroot.
UNION_CHOICES
= ((0, u'aufs'), (1, u'overlayfs'), (2, u'unionfs'), (3, u'overlay'))¶
-
DirChroot.
UNION_OVERLAY
= 3¶
-
DirChroot.
UNION_OVERLAYFS
= 1¶
-
DirChroot.
UNION_UNIONFS
= 2¶
-
DirChroot.
chroot_ptr
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
DirChroot.
get_union_type_display
(*moreargs, **morekwargs)¶
-
DirChroot.
mbd_backend_flavor
()¶
-
DirChroot.
mbd_get_chroot_dir
()¶
-
DirChroot.
mbd_get_post_sequence
()¶
-
DirChroot.
mbd_get_schroot_conf
()¶
-
DirChroot.
objects
= <django.db.models.manager.Manager object>¶
-
class
-
class
mini_buildd.models.chroot.
FileChroot
(*args, **kwargs)¶ Bases:
mini_buildd.models.chroot.Chroot
File chroot backend.
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.chroot.Admin
-
fieldsets
= [(u'Chroot identity', {u'fields': ((u'source', u'architecture'), u'personality', u'personality_override')}), (u'Extra options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u'\n<b>Supported extra options</b>\n<p><tt>Debootstrap-Command: ALT_COMMAND</tt>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <tt>Debootstrap-Command: /usr/sbin/qemu-debootstrap</tt> may be used to produce <em>armel</em>\nchroots (with <tt>qemu-user-static</tt> installed).\n</p>\n'}), (u'File options', {u'fields': (u'compression',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
mbd_model
¶ alias of
FileChroot
-
media
¶
-
-
FileChroot.
COMPRESSION_BZIP2
= 2¶
-
FileChroot.
COMPRESSION_CHOICES
= ((0, u'no compression'), (1, u'gzip'), (2, u'bzip2'), (3, u'xz'))¶
-
FileChroot.
COMPRESSION_GZIP
= 1¶
-
FileChroot.
COMPRESSION_NONE
= 0¶
-
FileChroot.
COMPRESSION_XZ
= 3¶
-
exception
FileChroot.
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
FileChroot.
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.chroot.MultipleObjectsReturned
-
FileChroot.
TAR_ARGS
= {0: [], 1: [u'--gzip'], 2: [u'--bzip2'], 3: [u'--xz']}¶
-
FileChroot.
TAR_SUFFIX
= {0: u'tar', 1: u'tar.gz', 2: u'tar.bz2', 3: u'tar.xz'}¶
-
FileChroot.
chroot_ptr
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
FileChroot.
get_compression_display
(*moreargs, **morekwargs)¶
-
FileChroot.
mbd_backend_flavor
()¶
-
FileChroot.
mbd_get_post_sequence
()¶
-
FileChroot.
mbd_get_schroot_conf
()¶
-
FileChroot.
mbd_get_tar_file
()¶
-
FileChroot.
objects
= <django.db.models.manager.Manager object>¶
-
class
-
class
mini_buildd.models.chroot.
LVMChroot
(*args, **kwargs)¶ Bases:
mini_buildd.models.chroot.Chroot
LVM chroot backend.
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.chroot.Admin
-
fieldsets
= [(u'Chroot identity', {u'fields': ((u'source', u'architecture'), u'personality', u'personality_override')}), (u'Extra options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u'\n<b>Supported extra options</b>\n<p><tt>Debootstrap-Command: ALT_COMMAND</tt>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <tt>Debootstrap-Command: /usr/sbin/qemu-debootstrap</tt> may be used to produce <em>armel</em>\nchroots (with <tt>qemu-user-static</tt> installed).\n</p>\n'}), (u'LVM options', {u'fields': (u'volume_group', u'filesystem', u'snapshot_size')})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
media
¶
-
-
exception
LVMChroot.
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
LVMChroot.
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.chroot.MultipleObjectsReturned
-
LVMChroot.
chroot_ptr
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
LVMChroot.
looplvmchroot
¶ Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
place.restaurant
is aReverseOneToOneDescriptor
instance.
-
LVMChroot.
mbd_backend_check
(request)¶
-
LVMChroot.
mbd_backend_flavor
()¶
-
LVMChroot.
mbd_get_lvm_device
()¶
-
LVMChroot.
mbd_get_post_sequence
()¶
-
LVMChroot.
mbd_get_pre_sequence
()¶
-
LVMChroot.
mbd_get_schroot_conf
()¶
-
LVMChroot.
mbd_get_volume_group
()¶
-
LVMChroot.
objects
= <django.db.models.manager.Manager object>¶
-
class
-
class
mini_buildd.models.chroot.
LoopLVMChroot
(*args, **kwargs)¶ Bases:
mini_buildd.models.chroot.LVMChroot
Loop LVM chroot backend.
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.chroot.Admin
-
fieldsets
= [(u'Chroot identity', {u'fields': ((u'source', u'architecture'), u'personality', u'personality_override')}), (u'Extra options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u'\n<b>Supported extra options</b>\n<p><tt>Debootstrap-Command: ALT_COMMAND</tt>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <tt>Debootstrap-Command: /usr/sbin/qemu-debootstrap</tt> may be used to produce <em>armel</em>\nchroots (with <tt>qemu-user-static</tt> installed).\n</p>\n'}), (u'LVM options', {u'fields': (u'volume_group', u'filesystem', u'snapshot_size')}), (u'Loop options', {u'fields': (u'loop_size',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
mbd_model
¶ alias of
LoopLVMChroot
-
media
¶
-
-
exception
LoopLVMChroot.
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
LoopLVMChroot.
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.chroot.MultipleObjectsReturned
-
LoopLVMChroot.
lvmchroot_ptr
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
LoopLVMChroot.
mbd_backend_flavor
()¶
-
LoopLVMChroot.
mbd_get_backing_file
()¶
-
LoopLVMChroot.
mbd_get_loop_device
()¶
-
LoopLVMChroot.
mbd_get_pre_sequence
()¶
-
LoopLVMChroot.
mbd_get_volume_group
()¶
-
LoopLVMChroot.
objects
= <django.db.models.manager.Manager object>¶
-
class
daemon
Module¶
-
class
mini_buildd.models.daemon.
Daemon
(id, extra_options, pickled_data, status, last_checked, auto_reactivate, identity, hostname, email_address, gnupg_template, gnupg_keyserver, ftpd_bind, ftpd_options, build_queue_size, sbuild_jobs, smtp_server, allow_emails_to, custom_hooks_directory, show_last_packages, show_last_builds, wait_for_build_results, keep_build_results)¶ Bases:
mini_buildd.models.base.StatusModel
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
fieldsets
= ((None, {u'fields': (), u'description': u'The daemon instance. There is always exactly one instance of this.\n\nprepare/remove actions will generate/remove the GnuPG key.\n'}), (u'Archive identity', {u'fields': ((u'identity', u'hostname', u'email_address'), u'gnupg_template')}), (u'FTP (incoming) Options', {u'fields': (u'ftpd_bind', u'ftpd_options')}), (u'Load Options', {u'fields': (u'build_queue_size', u'sbuild_jobs')}), (u'E-Mail Options', {u'fields': (u'smtp_server', u'notify', u'allow_emails_to')}), (u'Other Options', {u'fields': (u'gnupg_keyserver', u'custom_hooks_directory', u'show_last_packages', u'show_last_builds')}))¶
-
filter_horizontal
= (u'notify',)¶
-
media
¶
-
readonly_fields
= [u'smtp_server', u'ftpd_options', u'custom_hooks_directory']¶
-
save_model
(request, obj, form, change)¶ Always update date the daemon object to model.
-
-
exception
Daemon.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
Daemon.
LETHAL_DEPENDENCIES
= False¶
-
exception
Daemon.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Daemon.
clean
(*args, **kwargs)¶
-
Daemon.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
Daemon.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
Daemon.
get_status_display
(*moreargs, **morekwargs)¶
-
Daemon.
mbd_check
(request)¶ Just warn in case there are no repos and no chroots.
-
Daemon.
mbd_fullname
¶
-
Daemon.
mbd_get_archive_origin
()¶
-
Daemon.
mbd_get_dependencies
()¶ All active or to-be active repositories, remotes and chroots.
-
Daemon.
mbd_get_dput_conf
()¶
-
Daemon.
mbd_get_ftp_hopo
()¶
-
Daemon.
mbd_get_ftp_url
()¶
-
Daemon.
mbd_get_http_hopo
()¶
-
Daemon.
mbd_get_http_url
()¶
-
Daemon.
mbd_get_pub_key
()¶
-
Daemon.
mbd_gnupg
¶
-
Daemon.
mbd_gnupg_fingerprint
¶
-
Daemon.
mbd_gnupg_long_id
¶
-
Daemon.
mbd_notify
(subject, body, repository=None, changes=None, distribution=None, msglog=<logging.Logger object>)¶
-
Daemon.
mbd_prepare
(request)¶
-
Daemon.
mbd_remove
(request)¶
-
classmethod
Daemon.
mbd_sync
(request)¶
-
Daemon.
notify
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Daemon.
objects
= <django.db.models.manager.Manager object>¶
-
class
gnupg
Module¶
-
class
mini_buildd.models.gnupg.
AptKey
(id, extra_options, pickled_data, status, last_checked, auto_reactivate, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint)¶ Bases:
mini_buildd.models.gnupg.GnuPGPublicKey
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
AptKey.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
AptKey.
clean
(*args, **kwargs)¶
-
AptKey.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
AptKey.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
AptKey.
get_status_display
(*moreargs, **morekwargs)¶
-
AptKey.
objects
= <django.db.models.manager.Manager object>¶
-
AptKey.
source_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
mini_buildd.models.gnupg.
GnuPGPublicKey
(*args, **kwargs)¶ Bases:
mini_buildd.models.base.StatusModel
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
exclude
= (u'extra_options',)¶
-
media
¶
-
readonly_fields
= [u'key_long_id', u'key_created', u'key_expires', u'key_name', u'key_fingerprint']¶
-
search_fields
= [u'key_id', u'key_long_id', u'key_name', u'key_fingerprint']¶
-
-
class
GnuPGPublicKey.
Meta
¶ Bases:
mini_buildd.models.base.Meta
-
abstract
= False¶
-
app_label
= u'mini_buildd'¶
-
-
GnuPGPublicKey.
clean
(*args, **kwargs)¶
-
GnuPGPublicKey.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
GnuPGPublicKey.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
GnuPGPublicKey.
get_status_display
(*moreargs, **morekwargs)¶
-
GnuPGPublicKey.
mbd_check
(_request)¶ Checks that we actually have the key and long_id. This should always be true after “prepare”.
-
classmethod
GnuPGPublicKey.
mbd_filter_key
(key_id)¶
-
GnuPGPublicKey.
mbd_prepare
(_request)¶
-
GnuPGPublicKey.
mbd_remove
(_request)¶
-
GnuPGPublicKey.
mbd_sync
(request)¶
-
class
-
class
mini_buildd.models.gnupg.
KeyringKey
(*args, **kwargs)¶ Bases:
mini_buildd.models.gnupg.GnuPGPublicKey
Abtract class for GnuPG keys that influence the daemon’s keyring.
This basically means changes to remotes and users may be done on the fly (without stopping the daemon), to make this maintenance practically usable.
-
class
KeyringKey.
Meta
¶ Bases:
mini_buildd.models.base.Meta
-
abstract
= False¶
-
app_label
= u'mini_buildd'¶
-
-
KeyringKey.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
KeyringKey.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
KeyringKey.
get_status_display
(*moreargs, **morekwargs)¶
-
class
-
class
mini_buildd.models.gnupg.
Remote
(extra_options, pickled_data, status, last_checked, auto_reactivate, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint, http, wake_command)¶ Bases:
mini_buildd.models.gnupg.KeyringKey
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.gnupg.Admin
-
media
¶
-
readonly_fields
= [u'key_long_id', u'key_created', u'key_expires', u'key_name', u'key_fingerprint', u'key', u'key_id', u'pickled_data']¶
-
search_fields
= [u'key_id', u'key_long_id', u'key_name', u'key_fingerprint', u'http']¶
-
-
exception
Remote.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Remote.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Remote.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
Remote.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
Remote.
get_status_display
(*moreargs, **morekwargs)¶
-
Remote.
mbd_check
(request)¶ Check whether the remote mini-buildd is up, running and serving for us.
-
Remote.
mbd_get_status
(update=False)¶
-
Remote.
mbd_prepare
(request)¶
-
Remote.
mbd_remove
(request)¶
-
Remote.
objects
= <django.db.models.manager.Manager object>¶
-
class
-
class
mini_buildd.models.gnupg.
Uploader
(id, extra_options, pickled_data, status, last_checked, auto_reactivate, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint, user)¶ Bases:
mini_buildd.models.gnupg.KeyringKey
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.gnupg.Admin
-
filter_horizontal
= (u'may_upload_to',)¶
-
media
¶
-
readonly_fields
= [u'key_long_id', u'key_created', u'key_expires', u'key_name', u'key_fingerprint', u'user']¶
-
search_fields
= [u'key_id', u'key_long_id', u'key_name', u'key_fingerprint', u'user']¶
-
-
exception
Uploader.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Uploader.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Uploader.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
Uploader.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
Uploader.
get_status_display
(*moreargs, **morekwargs)¶
-
Uploader.
may_upload_to
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Uploader.
objects
= <django.db.models.manager.Manager object>¶
-
Uploader.
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
class
-
mini_buildd.models.gnupg.
cb_create_user_profile
(sender, instance, created, **kwargs)¶ Automatically create a user profile with every user that is created
msglog
Module¶
Message log: Logs that should also go to the end user.
An instance of MsgLog may replace the standard (python) log; logs will also go to the django messaging system, and it also stores the logs so they might used for other (non-django) uses.
Logs done via MsgLog (aka “messages”) are intended for the end user, to be shown in an UI (for us, the django web app or the command line client).
Log coding idioms to be used:
# Optional: Alias for MsgLog class in modules where we need it
from mini_buildd.models.msglog import MsgLog
# Always: Global standard LOG object, directly after imports)
LOG = logging.getLogger(__name__)
# Standard log
LOG.info("blah blah")
# Message log
MsgLog(LOG, request).info("Dear user: blah blah")
repository
Module¶
-
class
mini_buildd.models.repository.
ArchitectureOption
(id, extra_options, pickled_data, architecture, distribution, optional, build_architecture_all)¶ Bases:
mini_buildd.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
ArchitectureOption.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
ArchitectureOption.
architecture
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
ArchitectureOption.
clean
(*args, **kwargs)¶
-
ArchitectureOption.
distribution
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
ArchitectureOption.
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
mini_buildd.models.repository.
ArchitectureOptionInline
(parent_model, admin_site)¶ Bases:
django.contrib.admin.options.TabularInline
-
exclude
= (u'extra_options',)¶
-
extra
= 1¶
-
media
¶
-
model
¶ alias of
ArchitectureOption
-
-
class
mini_buildd.models.repository.
Distribution
(id, extra_options, pickled_data, base_source, build_dep_resolver, apt_allow_unauthenticated, lintian_mode, lintian_extra_options, piuparts_mode, piuparts_extra_options, piuparts_root_arg, chroot_setup_script, sbuildrc_snippet)¶ Bases:
mini_buildd.models.base.Model
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
fieldsets
= ((u'Basics', {u'fields': (u'base_source', u'extra_sources', u'components')}), (u'Build options', {u'fields': (u'build_dep_resolver', u'apt_allow_unauthenticated', u'lintian_mode', u'lintian_extra_options')}), (u'Chroot setup options', {u'fields': (u'chroot_setup_script', u'sbuildrc_snippet'), u'classes': (u'collapse',)}), (u'Extra Options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u"\n<b>Supported extra options</b>\n<p><em>Internal-APT-Priority: N</em>: Set APT priority for internal apt sources in builds.</p>\n<p>\nThe default is 1, which means you will only build against newer\npackages in our own repositories in case it's really needed by\nthe build dependencies. This is the recommended behaviour,\nproducing sparse dependencies.\n</p>\n<p>\nHowever, some packages with incorrect build dependencies might\nbreak anyway, while they would work fine when just build against\nthe newest version available.\n</p>\n<p>\nSo, in case you don't care about sparse dependencies, you can\npimp the internal priority up here.\n</p>\n<p>\n<em>Example</em>:\n<tt>Internal-APT-Priority: 500</tt>: Always build against newer internal packages.\n</p>\n"}))¶
-
filter_horizontal
= (u'extra_sources', u'components')¶
-
inlines
= (<class 'mini_buildd.models.repository.ArchitectureOptionInline'>,)¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶ Add default distribution objects for all base sources found.
-
mbd_model
¶ alias of
Distribution
-
media
¶
-
-
exception
Distribution.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
Distribution.
LINTIAN_CHOICES
= ((0, u"Don't run lintian"), (1, u'Run lintian'), (2, u'Run lintian and fail on errors'), (3, u'Run lintian and fail on warnings'))¶
-
Distribution.
LINTIAN_DISABLED
= 0¶
-
Distribution.
LINTIAN_FAIL_ON_ERROR
= 2¶
-
Distribution.
LINTIAN_FAIL_ON_WARNING
= 3¶
-
Distribution.
LINTIAN_RUN_ONLY
= 1¶
-
exception
Distribution.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Distribution.
PIUPARTS_CHOICES
= ((0, u"Don't run piuparts"), (1, u'Run piuparts'), (2, u'Run piuparts and fail on errors'), (3, u'Run piuparts and fail on warnings'))¶
-
Distribution.
PIUPARTS_DISABLED
= 0¶
-
Distribution.
PIUPARTS_FAIL_ON_ERROR
= 2¶
-
Distribution.
PIUPARTS_FAIL_ON_WARNING
= 3¶
-
Distribution.
PIUPARTS_RUN_ONLY
= 1¶
-
Distribution.
RESOLVER_APT
= 0¶
-
Distribution.
RESOLVER_APTITUDE
= 1¶
-
Distribution.
RESOLVER_CHOICES
= ((0, u'apt'), (1, u'aptitude'), (2, u'internal'))¶
-
Distribution.
RESOLVER_INTERNAL
= 2¶
-
Distribution.
architectureoption_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Distribution.
architectures
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Distribution.
base_source
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Distribution.
components
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Distribution.
extra_sources
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Distribution.
get_build_dep_resolver_display
(*moreargs, **morekwargs)¶
-
Distribution.
get_lintian_mode_display
(*moreargs, **morekwargs)¶
-
Distribution.
get_piuparts_mode_display
(*moreargs, **morekwargs)¶
-
Distribution.
mbd_get_apt_line
(repository, suite_option, rollback=None, prefix=u'deb ')¶
-
Distribution.
mbd_get_apt_preferences
(repository, suite_option)¶
-
Distribution.
mbd_get_apt_sources_list
(repository, suite_option)¶
-
Distribution.
mbd_get_archall_architectures
()¶
-
Distribution.
mbd_get_architectures
(show_opt_flag=False)¶
-
Distribution.
mbd_get_components
()¶
-
Distribution.
mbd_get_mandatory_architectures
()¶
-
Distribution.
mbd_get_reverse_dependencies
()¶ When the distribution changes, all repos that use that distribution also change.
-
Distribution.
mbd_get_sbuildrc_snippet
(arch)¶
-
Distribution.
objects
= <django.db.models.manager.Manager object>¶
-
Distribution.
repository_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
class
mini_buildd.models.repository.
EmailAddress
(extra_options, pickled_data, address, name)¶ Bases:
mini_buildd.models.base.Model
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
exclude
= (u'extra_options',)¶
-
mbd_model
¶ alias of
EmailAddress
-
media
¶
-
-
exception
EmailAddress.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
EmailAddress.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
EmailAddress.
daemon_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
EmailAddress.
objects
= <django.db.models.manager.Manager object>¶
-
EmailAddress.
repository_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
class
mini_buildd.models.repository.
Layout
(extra_options, pickled_data, name, default_version, mandatory_version_regex, experimental_default_version, experimental_mandatory_version_regex)¶ Bases:
mini_buildd.models.base.Model
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
fieldsets
= ((u'Basics', {u'fields': (u'name',)}), (u'Version Options', {u'fields': (u'default_version', u'mandatory_version_regex', u'experimental_default_version', u'experimental_mandatory_version_regex'), u'classes': (u'collapse',)}), (u'Extra Options', {u'fields': (u'extra_options',), u'classes': (u'collapse',), u'description': u"\n<b>Supported extra options</b>\n<p><em>Meta-Distributions: META=CODENAME-SUITE[ META=CODENAME-SUITE[...</em>: Support METAs alone as distribution identifier.</p>\n<p>\nMeta distribution identifiers should be unique across all\nrepositories; usually, a layout with meta distributions should\nonly be used by at most one repository.\n</p>\n<p>\n<em>Example</em>:\n<tt>Meta-Distributions: unstable=sid-unstable experimental=sid-experimental</tt>\n(see standard layout 'Debian Developer'), to allow upload/testing of\npackages (to unstable,experimental,..) aimed for Debian.\n</p>\n"}))¶
-
inlines
= (<class 'mini_buildd.models.repository.SuiteOptionInline'>,)¶
-
classmethod
mbd_meta_create_defaults
(msglog)¶ Create default layouts and suites.
-
media
¶
-
-
exception
Layout.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Layout.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Layout.
mbd_get_default_version
(repository, distribution, suite_option)¶
-
Layout.
mbd_get_mandatory_version_regex
(repository, distribution, suite_option)¶
-
Layout.
mbd_get_reverse_dependencies
()¶ When the layout changes, all repos that use that layout also change.
-
Layout.
objects
= <django.db.models.manager.Manager object>¶
-
Layout.
repository_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Layout.
suiteoption_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Layout.
suites
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
class
mini_buildd.models.repository.
Repository
(extra_options, pickled_data, status, last_checked, auto_reactivate, identity, layout, allow_unauthenticated_uploads, extra_uploader_keyrings, notify_changed_by, notify_maintainer, reprepro_morguedir, external_home_url)¶ Bases:
mini_buildd.models.base.StatusModel
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
fieldsets
= ((u'Basics', {u'fields': (u'identity', u'layout', u'distributions', u'allow_unauthenticated_uploads', u'extra_uploader_keyrings')}), (u'Notify and extra options', {u'fields': (u'notify', u'notify_changed_by', u'notify_maintainer', u'reprepro_morguedir', u'external_home_url')}))¶
-
filter_horizontal
= (u'distributions', u'notify')¶
-
get_readonly_fields
(_request, obj=None)¶ Forbid change identity on existing repository.
-
classmethod
mbd_meta_add_debdev
(msglog)¶ Add developer repository ‘debdev’, only for sid.
-
classmethod
mbd_meta_add_sandbox
(msglog)¶ Add sandbox repository ‘test’.
-
classmethod
mbd_meta_build_keyring_packages
(msglog)¶
-
classmethod
mbd_meta_build_test_packages
(msglog)¶
-
mbd_model
¶ alias of
Repository
-
media
¶
-
readonly_fields
= []¶
-
-
exception
Repository.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Repository.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Repository.
clean
(*args, **kwargs)¶
-
Repository.
distributions
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Repository.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
Repository.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
Repository.
get_status_display
(*moreargs, **morekwargs)¶
-
Repository.
layout
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Repository.
mbd_build_keyring_packages
(request)¶
-
Repository.
mbd_build_test_packages
(request)¶
-
Repository.
mbd_check
(request)¶
-
Repository.
mbd_distribution_strings
(**suiteoption_filter)¶ Return a list with all full distributions strings, optionally matching a suite options filter (unstable, experimental,...).
-
Repository.
mbd_get_apt_keys
(distribution)¶
-
Repository.
mbd_get_dependencies
()¶
-
Repository.
mbd_get_description
(distribution, suite_option)¶
-
Repository.
mbd_get_dsc_url
(distribution, package, version)¶ Get complete DSC URL of an installed package.
-
Repository.
mbd_get_internal_suite_dependencies
(suite_option)¶
-
Repository.
mbd_get_meta_distributions
(distribution, suite_option)¶
-
Repository.
mbd_get_path
()¶
-
Repository.
mbd_get_uploader_keyring
()¶
-
Repository.
mbd_package_find
(package, distribution=None, version=None)¶
-
Repository.
mbd_package_install
(distribution, suite_option, changes, bresults)¶ Install a dict arch:bres of successful build results.
-
Repository.
mbd_package_list
(pattern, typ=None, with_rollbacks=False, dist_regex=u'')¶
-
Repository.
mbd_package_migrate
(package, distribution, suite, rollback=None, version=None, msglog=<logging.Logger object>)¶
-
Repository.
mbd_package_notify
(status, distribution, pkg, body, extra=None, message=None, msglog=<logging.Logger object>)¶
-
Repository.
mbd_package_precheck
(distribution, suite_option, package, version)¶
-
Repository.
mbd_package_purge_orphaned_logs
(package=None, msglog=<logging.Logger object>)¶
-
Repository.
mbd_package_remove
(package, distribution, suite, rollback=None, version=None, msglog=<logging.Logger object>)¶
-
Repository.
mbd_package_show
(package)¶ Result is of the form:
- [(CODENAME, [{“distribution”: DIST,
- “component”: COMPONENT, “source”: PKG_NAME, “sourceversion”: VERSION, “migrates_to”: DIST, “uploadable”: BOOL, “experimental”: BOOL, “sort_no”: NO, “rollbacks”: [{“no”: 0, “distribution”: DIST, “source”: PKG_NAME, “sourceversion”: VERS0}, ...]}])]
-
Repository.
mbd_prepare
(_request)¶ Idempotent repository preparation. This may be used as-is as mbd_sync.
-
Repository.
mbd_remove
(_request)¶
-
Repository.
mbd_sync
(request)¶
-
Repository.
notify
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Repository.
objects
= <django.db.models.manager.Manager object>¶
-
Repository.
uploader_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
class
mini_buildd.models.repository.
Suite
(id, extra_options, pickled_data, name)¶ Bases:
mini_buildd.models.base.Model
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
exclude
= (u'extra_options',)¶
-
media
¶
-
-
exception
Suite.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Suite.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Suite.
clean
(*args, **kwargs)¶
-
Suite.
layout_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Suite.
objects
= <django.db.models.manager.Manager object>¶
-
Suite.
suiteoption_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
class
mini_buildd.models.repository.
SuiteOption
(id, extra_options, pickled_data, layout, suite, uploadable, experimental, migrates_to, build_keyring_package, auto_migrate_after, not_automatic, but_automatic_upgrades)¶ Bases:
mini_buildd.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
SuiteOption.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
SuiteOption.
clean
(*args, **kwargs)¶
-
SuiteOption.
layout
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
SuiteOption.
mbd_get_apt_pin
(repository, distribution)¶
-
SuiteOption.
mbd_get_apt_preferences
(repository, distribution, prio=1)¶
-
SuiteOption.
mbd_get_distribution_string
(repository, distribution, rollback=None)¶
-
SuiteOption.
mbd_get_sort_no
()¶ Compute number that may be used to sort suites from ‘stable’ (0) towards ‘experimental’.
-
SuiteOption.
migrates_to
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
SuiteOption.
objects
= <django.db.models.manager.Manager object>¶
-
SuiteOption.
rollback
¶ Rollback field temporarily implemented as extra_option.
-
SuiteOption.
suite
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
SuiteOption.
suiteoption_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
mini_buildd.models.repository.
SuiteOptionInline
(parent_model, admin_site)¶ Bases:
django.contrib.admin.options.TabularInline
-
extra
= 1¶
-
media
¶
-
model
¶ alias of
SuiteOption
-
-
mini_buildd.models.repository.
get_meta_distribution_map
()¶ Get a dict of the meta distributions: meta -> actual.
source
Module¶
-
class
mini_buildd.models.source.
Architecture
(extra_options, pickled_data, name)¶ Bases:
mini_buildd.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Architecture.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Architecture.
architectureoption_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Architecture.
chroot_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Architecture.
distribution_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
classmethod
Architecture.
mbd_host_architecture
()¶
-
classmethod
Architecture.
mbd_supported_architectures
(arch=None)¶ Some archs also natively support other archs.
-
Architecture.
objects
= <django.db.models.manager.Manager object>¶
-
Architecture.
source_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
mini_buildd.models.source.
Archive
(extra_options, pickled_data, url, ping)¶ Bases:
mini_buildd.models.base.Model
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
exclude
= (u'extra_options',)¶
-
classmethod
mbd_meta_add_debian
(msglog)¶ Add internet Debian archive sources.
-
classmethod
mbd_meta_add_from_sources_list
(msglog)¶ Scan local sources list and add all archives found there.
-
classmethod
mbd_meta_add_ubuntu
(msglog)¶ Add internet Ubuntu archive sources.
-
media
¶
-
search_fields
= [u'url']¶
-
-
exception
Archive.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Archive.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Archive.
clean
(*args, **kwargs)¶
-
Archive.
mbd_get_matching_release
(request, source, gnupg)¶
-
Archive.
mbd_get_reverse_dependencies
()¶ Return all sources (and their deps) that use us.
-
Archive.
mbd_ping
(request)¶ Ping and update the ping value.
-
Archive.
objects
= <django.db.models.manager.Manager object>¶
-
Archive.
source_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
class
mini_buildd.models.source.
Component
(extra_options, pickled_data, name)¶ Bases:
mini_buildd.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Component.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Component.
distribution_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Component.
objects
= <django.db.models.manager.Manager object>¶
-
Component.
source_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
mini_buildd.models.source.
PrioritySource
(id, extra_options, pickled_data, source, priority)¶ Bases:
mini_buildd.models.base.Model
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
exclude
= (u'extra_options',)¶
-
classmethod
mbd_meta_add_extras
(msglog)¶ Add all backports as prio=1 prio sources
-
mbd_model
¶ alias of
PrioritySource
-
media
¶
-
-
exception
PrioritySource.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
PrioritySource.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
PrioritySource.
distribution_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
PrioritySource.
mbd_get_apt_preferences
()¶
-
PrioritySource.
objects
= <django.db.models.manager.Manager object>¶
-
PrioritySource.
source
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
class
-
class
mini_buildd.models.source.
Source
(id, extra_options, pickled_data, status, last_checked, auto_reactivate, origin, codename, description, codeversion, codeversion_override)¶ Bases:
mini_buildd.models.base.StatusModel
-
class
Admin
(model, admin_site)¶ Bases:
mini_buildd.models.base.Admin
-
fieldsets
= ((u'Identity', {u'fields': (u'origin', u'codename', u'extra_options', u'apt_keys')}), (u'Extra', {u'fields': (u'description', u'codeversion', u'codeversion_override', u'archives', u'components', u'architectures'), u'classes': (u'collapse',)}))¶
-
filter_horizontal
= (u'apt_keys',)¶
-
get_readonly_fields
(_request, obj=None)¶ Forbid to change identity on existing source (usually a bad idea; repos/chroots that refer to us may break).
-
list_display
= [u'colored_status', u'__unicode__', u'origin', u'codename']¶
-
classmethod
mbd_filter_active_base_sources
()¶ Filter active base sources; needed in chroot and distribution wizards.
-
classmethod
mbd_meta_add_debian
(msglog)¶ Add well-known Debian sources
7638D0442B90D010: Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org> CBF8D6FD518E17E1: Jessie Stable Release Key <debian-release@lists.debian.org>
8B48AD6246925553: Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org> 6FB2A1C265FFB764: Wheezy Stable Release Key <debian-release@lists.debian.org>
AED4B06F473041FA: Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org> 64481591B98321F9: Squeeze Stable Release Key <debian-release@lists.debian.org>
9AA38DCD55BE302B: Debian Archive Automatic Signing Key (5.0/lenny) <ftpmaster@debian.org> 4D270D06F42584E6: Lenny Stable Release Key <debian-release@lists.debian.org>
B5D0C804ADB11277: Etch Stable Release Key <debian-release@lists.debian.org> EA8E8B2116BA136C: Backports.org Archive Key <ftp-master@backports.org>
-
classmethod
mbd_meta_add_ubuntu
(msglog)¶ Add well-known Ubuntu sources
-
media
¶
-
ordering
= [u'origin', u'codename']¶
-
readonly_fields
= [u'codeversion', u'archives', u'components', u'architectures', u'description']¶
-
search_fields
= [u'origin', u'codename']¶
-
-
exception
Source.
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Source.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Source.
apt_keys
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Source.
architectures
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Source.
archives
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Source.
chroot_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Source.
components
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Source.
distribution_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Source.
get_next_by_last_checked
(*moreargs, **morekwargs)¶
-
Source.
get_previous_by_last_checked
(*moreargs, **morekwargs)¶
-
Source.
get_status_display
(*moreargs, **morekwargs)¶
-
Source.
mbd_check
(request)¶ Rescan all archives, and check that there is at least one working.
-
Source.
mbd_get_apt_line
(distribution, prefix=u'deb ')¶
-
Source.
mbd_get_apt_pin
()¶ Apt ‘pin line’ (for use in a apt ‘preference’ file).
-
Source.
mbd_get_archive
()¶ Returns the fastest archive.
-
Source.
mbd_get_dependencies
()¶
-
Source.
mbd_get_reverse_dependencies
()¶ Return all chroots and repositories that use us.
-
Source.
mbd_is_matching_release
(request, release)¶ Check that this release file matches us.
-
Source.
mbd_prepare
(request)¶
-
Source.
mbd_release_file_values
()¶ Compute a dict of values a matching release file must have.
-
Source.
mbd_remove
(_request)¶
-
Source.
mbd_sync
(request)¶
-
Source.
objects
= <django.db.models.manager.Manager object>¶
-
Source.
prioritysource_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
-
mini_buildd.models.source.
cmp_components
(component0, component1)¶ Get Debian components as string in a suitable order – i.e., ‘main’ should be first, the others in alphabetical order.
Basically only needed for reprepro’s (broken?) default component guessing, which uses the first given component in the configuration.
subscription
Module¶
-
class
mini_buildd.models.subscription.
Subscription
(id, extra_options, pickled_data, subscriber, package, distribution)¶ Bases:
mini_buildd.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Subscription.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Subscription.
objects
= <django.db.models.manager.Manager object>¶
-
Subscription.
subscriber
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
exception