mini_buildd.models module

Models of the django app mini_buildd

Attention

Daemon: When changing ftp network settings, then PCA: Still not active, needs explicit restart?

Attention

Distribution: When adding Architecture: No indication that we need to re-index (run check on repository)

Attention

Distribution (workaround in __str__): Not unique for base source (historic fluke)

Attention

AptKeys: Duplicates possible (will break API call setup)

Attention

Chroot: LVM chroots fail running lvcreate with ‘not found: device not cleared’ (Debian Bug #705238)

Unclear, ancient. See also: http://lists.debian.org/debian-user/2012/12/msg00407.html.

“–noudevsync” workaround makes lvcreate work again, but the chroot will not work later anyway later.

Note

Daemon: Instance does not touch the GPG setup once it’s created – unless you do an explicit remove on the instance.

Note

Uploader: Don’t add or delete instances manually!

These are bound to users, and come automatically when new users are created. The administrator only changes these instances to grant rights.

Note

Chroot (mbd_workaround_debmirror_script): Be able to strap ‘newer Ubuntus’ with Debian’s debootstrap

Installed debootstrap might be outdated and not be able to strap newer codenames. Generally, the solution is to simply install an updated debootstrap that can handle this.

However, newer Ubuntu releases are usually not supported in a timely fashion in Debian’s debootstrap. Furthermore, Ubuntu’s variant no longer provides scripts (or symlinks): See http://changelogs.ubuntu.com/changelogs/pool/main/d/debootstrap/debootstrap_1.0.132ubuntu1/changelog

This workaround basically does the same as the hardcoded change in Ubuntu’s debootstrap: Just use ‘gutsy’ as default. In case that change is incorporated into Debian’s debootstrap, this workaround is obsolete again.

Note

Chroot (setup workaround in dist.py): debootstrap fails for <=lenny chroots on >=jessie host kernel (uname) (Debian Bug #642031)

This should ideally be worked around in debootstrap itself eventually.

mini-buildd comes with a workaround wrapper command ‘mini-buildd-debootstrap-uname-2.6’. Just use /usr/sbin/mini-buildd-debootstrap-uname-2.6 as debootstrap_command in resp. chroots.

Fwiw, this is due to older libc6 packaging’s preinst, which will meekly fail if uname -r starts with a two-digit version; i.e.:

FINE : 3.2.0-4-amd64      Standard wheezy kernel
FAILS: 3.10-2-amd64       Standard jessie/sid kernel
FAILS: 3.9-0.bpo.1-amd64  Wheezy backport of the jessie/sid kernel

Tip

Chroot: Install Debian package ‘qemu-user-static’ for seamless access to foreign archs (albeit with a speed penalty)

Naming conventions

Model class and field names

All model class names and all field names must be human readable with no abbreviations (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 separated 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

Any 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.

mini_buildd.models.help_html(help_plain)

Prepare plain help for HTML

mini_buildd.models.mbd_msg(request, msg_lines, level=20, level_followups=20)

Convey message to user via django messaging, with extra multiline (‘followups’) formatting support

class mini_buildd.models.RegexValidator(*args, **kwargs)

Bases: RegexValidator

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.ForbiddenKeysValidator(*args, **kwargs)

Bases: object

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.ServerEndpointValidator(*args, **kwargs)

Bases: object

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.UnixTextField(*args, db_collation=None, **kwargs)

Bases: TextField

Normalizes \r\n newlines (usually send by browsers) to Unix newlines \n

get_prep_value(value)

Perform preliminary non-db specific value checks and conversions.

class mini_buildd.models.Model(*args, **kwargs)

Bases: Model

Abstract father model for all mini-buildd models

This just makes sure no config is changed or deleted while the daemon is running.

classmethod mbd_get_or_none(**kwargs)

Get unambiguous instance or None if no such instance (objects.get() w/o exception)

classmethod mbd_get_fields(exclude=None)
class Meta

Bases: object

abstract = False
app_label = 'mini_buildd'
class Admin(model, admin_site)

Bases: ModelAdmin

save_on_top = True
save_as = True
save_as_continue = False
save_model(request, obj, form, change)

Given a model instance save it to the database.

delete_model(request, obj)

Given a model instance delete it from the database.

property media
mbd_class_name()

Allow to get class name in templates

mbd_get_dependencies()
mbd_get_reverse_dependencies()
classmethod mbd_get_default(field_name)
mbd_validate_field_unchanged(name)
class mini_buildd.models.StatusModel(*args, **kwargs)

Bases: Model

Abstract model class for all models that carry a status

STATUS_REMOVED = 0
STATUS_PREPARED = 1
STATUS_ACTIVE = 2
STATUS_CHOICES = [(0, 'Removed'), (1, 'Prepared'), (2, 'Active')]
status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

CHECK_NONE = datetime.datetime(1, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)
CHECK_CHANGED = datetime.datetime(1, 1, 2, 0, 0, tzinfo=datetime.timezone.utc)
CHECK_FAILED = datetime.datetime(1, 1, 3, 0, 0, tzinfo=datetime.timezone.utc)
CHECK_REACTIVATE = datetime.datetime(1, 1, 4, 0, 0, tzinfo=datetime.timezone.utc)
CHECK_STRINGS = {datetime.datetime(1, 1, 1, 0, 0, tzinfo=datetime.timezone.utc): {'char': '-', 'string': 'Unchecked -- please run check'}, datetime.datetime(1, 1, 2, 0, 0, tzinfo=datetime.timezone.utc): {'char': '*', 'string': 'Changed -- please prepare again'}, datetime.datetime(1, 1, 3, 0, 0, tzinfo=datetime.timezone.utc): {'char': 'x', 'string': 'Failed -- please fix and check again'}, datetime.datetime(1, 1, 4, 0, 0, tzinfo=datetime.timezone.utc): {'char': 'A', 'string': 'Failed in active state -- will auto-activate when check succeeds again'}}
last_checked

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

LETHAL_DEPENDENCIES = True
class Meta

Bases: Meta

abstract = False
class Admin(model, admin_site)

Bases: Admin

save_model(request, obj, form, change)

Given a model instance save it to the database.

classmethod mbd_prepare(obj)
classmethod mbd_check(obj, force=False, needs_activation=False)
classmethod mbd_pc(obj, force=False, needs_activation=False)
classmethod mbd_activate(obj)
classmethod mbd_pca(obj, force=False, needs_activation=False)
classmethod mbd_deactivate(obj)
classmethod mbd_remove(obj)
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_prepare(request, queryset)
mbd_action_check(request, queryset)
mbd_action_pc(request, queryset)
mbd_action_activate(request, queryset)
mbd_action_pca(request, queryset)
mbd_action_deactivate(request, queryset)
mbd_action_remove(request, queryset)
actions = (<function StatusModel.Admin.mbd_action_prepare>, <function StatusModel.Admin.mbd_action_check>, <function StatusModel.Admin.mbd_action_pc>, <function StatusModel.Admin.mbd_action_activate>, <function StatusModel.Admin.mbd_action_pca>, <function StatusModel.Admin.mbd_action_deactivate>, <function StatusModel.Admin.mbd_action_remove>)
list_display = ('_status', '__str__')
property media
mbd_set_changed()
mbd_is_prepared()
mbd_is_active()
mbd_is_checked()
mbd_is_changed()
mbd_is_reactivate()
classmethod mbd_get_active()
classmethod mbd_get_active_or_auto_reactivate()
classmethod mbd_get_prepared()
mbd_get_check_display(typ='string')
mbd_get_status_display(typ='string')
get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
class mini_buildd.models.GnuPGPublicKey(*args, **kwargs)

Bases: StatusModel

key_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key_long_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key_created

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key_expires

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

key_fingerprint

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Meta

Bases: Meta

abstract = False
app_label = 'mini_buildd'
class Admin(model, admin_site)

Bases: Admin

list_display = ('_status', '__str__', 'key_created', 'key_expires', 'key_fingerprint')
search_fields = ('key_id', 'key_long_id', 'key_name', 'key_fingerprint')
property media
mbd_key_id()

Get valid key id while preferring long key id

Traditionally, also short ids were used for key_id. This assures a valid key is returned regardless of the state (if unprepared, key_long_id would be empty) while also preferring the long key if it exists.

classmethod mbd_filter_key(key_id)
mbd_prepare()
mbd_remove()
mbd_sync()
mbd_check()

Check that we actually have the key and long_id. This should always be true after prepare

mbd_verify(signed_message)
get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
class mini_buildd.models.AptKey(id, status, last_checked, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint)

Bases: GnuPGPublicKey

clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

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.Uploader(id, status, last_checked, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint, user)

Bases: GnuPGPublicKey

user

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class Admin(model, admin_site)

Bases: Admin

search_fields = ('key_id', 'key_long_id', 'key_name', 'key_fingerprint', 'user__username')
readonly_fields = ('user',)
filter_horizontal = ('may_upload_to',)
property media
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
user_id
mini_buildd.models.cb_create_user_profile(sender, instance, created, **kwargs)

Automatically create a user profile with every user that is created

class mini_buildd.models.Remote(status, last_checked, key_id, key, key_long_id, key_created, key_expires, key_name, key_fingerprint, http, wake_command)

Bases: GnuPGPublicKey

http

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

wake_command

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

search_fields = ('key_id', 'key_long_id', 'key_name', 'key_fingerprint', 'http')
readonly_fields = ('key_id', 'key')
property media
mbd_url()
mbd_api(command, timeout=None)
mbd_get_status(timeout=2, wake=False, wake_sleep=5, wake_attempts=2)
mbd_prepare()
mbd_check()

Check whether the remote mini-buildd is up, running and serving for us

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
objects = <django.db.models.manager.Manager object>
class mini_buildd.models.Builders(wake=False, check=False)

Bases: list

All active builders (ourselves as Meta-Remote plus all actual Remotes) with status

Is used to choose builder to upload to, and as data for the Builder’s View.

class Builder(remote, status, exception, ourselves)

Bases: tuple

exception

Alias for field number 2

ourselves

Alias for field number 3

remote

Alias for field number 0

status

Alias for field number 1

get(codename, arch)

Get a dict {<load>: <status>} of active builders for <codename>/<arch>

class mini_buildd.models.Archive(url, ping)

Bases: Model

URLOPEN_TIMEOUT = 15
url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ping

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

search_fields = ('url',)
property media
class ReleaseFile(url_base)

Bases: object

close()
match(source)
verify(_gnupg)
mbd_ping()

Ping and update the ping value

mbd_get_reverse_dependencies()

Return all sources (and their deps) that use us

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

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.Architecture(name)

Bases: Model

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

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.Component(*args, **kwargs)

Bases: Model

A Debian component (like ‘main’, ‘contrib’, ‘non-free’)

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

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(id, status, last_checked, origin, codename, extra_identifiers, codeversion_override, codeversion_guessed, codeversion, check_valid_until, remove_from_component, description)

Bases: StatusModel

origin

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

codename

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

extra_identifiers

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

codeversion_override

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

codeversion_guessed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

codeversion

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

check_valid_until

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

remove_from_component

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class Admin(model, admin_site)

Bases: Admin

list_display = ('_status', '__str__', 'codeversion', '_meta_field_apt_line')
search_fields = ('origin', 'codename')
readonly_fields = ('codeversion_guessed', 'description', 'archives', 'components', 'architectures')
filter_horizontal = ('apt_keys',)
classmethod mbd_filter_active_base_sources()

Filter active base sources; needed in chroot and distribution wizards

property media
imbd_release_file_values()

Yield key/values a matching release file must match

mbd_get_archive()

Get fastest archive

mbd_get_apt_line(limit_components=None)
mbd_get_apt_pin()

Apt ‘pin line’ (for use in a apt ‘preference’ file)

mbd_prepare()
mbd_sync()
mbd_remove()
mbd_check()

Rescan all archives, and check that there is at least one working

mbd_get_dependencies()
mbd_get_reverse_dependencies()

Return all chroots and repositories that use us

clean()

Forbid to change identity on existing source (usually a bad idea; repos/chroots that refer to us may break)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
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 a ReverseManyToOneDescriptor 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.PrioritySource(id, source, priority)

Bases: Model

source

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

priority

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

search_fields = ('source__origin', 'source__codename')
property media
mbd_get_apt_preferences()
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
source_id
class mini_buildd.models.Suite(id, name)

Bases: Model

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
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 a ReverseManyToOneDescriptor 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.SuiteOption(id, layout, suite, uploadable, experimental, migrates_to, rollback, build_keyring_package, not_automatic, but_automatic_upgrades)

Bases: Model

layout

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

suite

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

uploadable

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

experimental

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

migrates_to

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

rollback

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

build_keyring_package

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

not_automatic

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

but_automatic_upgrades

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

mbd_migrates_to(other)

Check if we, directly or transitively, migrate to other suite

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

layout_id
migrates_to_id
objects = <django.db.models.manager.Manager object>
suite_id
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 a ReverseManyToOneDescriptor 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.SuiteOptionInline(parent_model, admin_site)

Bases: TabularInline

model

alias of SuiteOption

extra = 1
property media
class mini_buildd.models.Layout(name, default_version, mandatory_version_regex, experimental_default_version, experimental_mandatory_version_regex, meta_distributions)

Bases: Model

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

default_version

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mandatory_version_regex

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

experimental_default_version

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

experimental_mandatory_version_regex

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

meta_distributions

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

inlines = (<class 'mini_buildd.models.SuiteOptionInline'>,)
property media
mbd_get_reverse_dependencies()

When the layout changes, all repos that use that layout also change

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

objects = <django.db.models.manager.Manager object>
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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 a ReverseManyToOneDescriptor 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.ArchitectureOption(id, architecture, distribution, optional, build_architecture_all)

Bases: Model

architecture

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

distribution

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

optional

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

build_architecture_all

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

architecture_id
distribution_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class mini_buildd.models.ArchitectureOptionInline(parent_model, admin_site)

Bases: TabularInline

model

alias of ArchitectureOption

extra = 1
property media
class mini_buildd.models.ShebangValidator(*args, **kwargs)

Bases: object

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.SbuildConfigBlocksValidator(*args, **kwargs)

Bases: object

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.SbuildSetupBlocksValidator(*args, **kwargs)

Bases: object

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.Distribution(id, base_source, build_dep_resolver, sbuild_config_blocks, sbuild_setup_blocks, lintian_mode, lintian_extra_options, lintian_warnfail_options, piuparts_mode, piuparts_extra_options, piuparts_root_arg, autopkgtest_mode, internal_apt_priority, deb_build_options, deb_build_profiles, add_depends, chroot_setup_script, sbuildrc_snippet)

Bases: Model

base_source

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

RESOLVER_APT = 0
RESOLVER_APTITUDE = 1
RESOLVER_INTERNAL = 2
RESOLVER_CHOICES = ((0, 'apt'), (1, 'aptitude'), (2, 'internal'))
build_dep_resolver

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sbuild_config_blocks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sbuild_setup_blocks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lintian_mode

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lintian_extra_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lintian_warnfail_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

piuparts_mode

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

piuparts_extra_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

piuparts_root_arg

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

autopkgtest_mode

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

internal_apt_priority

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deb_build_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deb_build_profiles

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

add_depends

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

chroot_setup_script

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sbuildrc_snippet

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

inlines = (<class 'mini_buildd.models.ArchitectureOptionInline'>,)
filter_horizontal = ('extra_sources', 'components')
property media
mbd_is_active()
mbd_setup()
mbd_get_components()
mbd_get_archall_architectures()
mbd_get_mandatory_architectures()
mbd_get_reverse_dependencies()

When the distribution changes, all repos that use that distribution also change

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

base_source_id
get_autopkgtest_mode_display(*, field=<django.db.models.fields.IntegerField: autopkgtest_mode>)
get_build_dep_resolver_display(*, field=<django.db.models.fields.IntegerField: build_dep_resolver>)
get_lintian_mode_display(*, field=<django.db.models.fields.IntegerField: lintian_mode>)
get_piuparts_mode_display(*, field=<django.db.models.fields.IntegerField: piuparts_mode>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

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.EmailAddress(address, name)

Bases: Model

address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

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.Repository(status, last_checked, identity, layout, allow_unauthenticated_uploads, extra_uploader_keyrings, notify_changed_by, notify_maintainer, reprepro_morguedir, external_home_url)

Bases: StatusModel

identity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

layout

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

allow_unauthenticated_uploads

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

extra_uploader_keyrings

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

notify_changed_by

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

notify_maintainer

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

reprepro_morguedir

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

external_home_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

LETHAL_DEPENDENCIES = False
class Admin(model, admin_site)

Bases: Admin

filter_horizontal = ('distributions', 'notify')
property media
mbd_setup(with_dists=True)
mbd_json()
mbd_get_diststr(distribution, suite, rollback=None)
mbd_get_diststrs(frollbacks=None, distributions_filter=None, suiteoption_filter=None)

List of all distribution strings (except rollbacks) in this repo, optionally matching a suite options filter (unstable, experimental,…)

mbd_get_meta_distributions(distribution, suite_option)
mbd_get_apt_pin(distribution, suite)
mbd_get_apt_preferences(distribution, suite, prio=1)
classmethod mbd_get_apt_keys(distribution)
mbd_get_internal_suite_dependencies(suite_option)
mbd_get_mandatory_version_regex(distribution, suite_option)
mbd_get_default_version(distribution, suite_option)
mbd_get_apt_line(distribution, suite_option, rollback=None, snapshot=None)
mbd_get_apt_build_sources_list(distribution, suite_option)
mbd_get_apt_build_preferences(distribution, suite_option, internal_apt_priority_override=None)
mbd_reprepro_update_config()
mbd_dsc_pool_path(source, version, raise_exception=True)

Get DSC pool path of an installed source (<repo>/pool/...)

mbd_package_migrate(package, distribution, suite, full=False, rollback=None, version=None)
mbd_package_remove(package, distribution, suite, rollback=None, version=None, without_rollback=False)
mbd_package_precheck(distribution, suite_option, package, version)
mbd_package_install(distribution, suite_option, changes, buildresults)

Install a dict arch:buildresult of successful build results

mbd_icodenames()
mbd_prepare()

Idempotent repository preparation. This may be used as-is as mbd_sync

mbd_sync()
mbd_remove()
mbd_check()
mbd_get_dependencies()
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
layout_id
objects = <django.db.models.manager.Manager object>
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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

mini_buildd.models.get_meta_distribution_map()

Get a dict of the meta distributions: meta -> actual

mini_buildd.models.map_distribution(diststr)

Map incoming distribution to internal

mini_buildd.models.get_repository(identity)

Get repository object with user error handling

mini_buildd.models.parse_dist(_dist, check_uploadable=False)
mini_buildd.models.parse_diststr(diststr, check_uploadable=False)
class mini_buildd.models.DaemonEmailField(*args, **kwargs)

Bases: EmailField

default_validators = [<django.core.validators.EmailValidator object>]
class mini_buildd.models.FtpdOptionsValidator(*args, **kwargs)

Bases: object

deconstruct()

Return a 3-tuple of class import path, positional arguments, and keyword arguments.

class mini_buildd.models.Daemon(id, status, last_checked, identity, custom_archive_origin, email_address, gnupg_template, gnupg_keyserver, ftpd_bind, ftpd_options, max_parallel_builds, event_queue_size, expire_events_after, expire_builds_after, allow_emails_to)

Bases: StatusModel

MBD_HELP_NEEDS_RESTART = '[Daemon must be restarted to activate this setting.]\n\n'
identity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

custom_archive_origin

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email_address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

gnupg_template

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

gnupg_keyserver

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ftpd_bind

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ftpd_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

max_parallel_builds

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event_queue_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

expire_events_after

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

expire_builds_after

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

allow_emails_to

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

LETHAL_DEPENDENCIES = False
class Admin(model, admin_site)

Bases: Admin

filter_horizontal = ('notify',)
property media
mbd_get_ftp_endpoint()
mbd_fullname()
mbd_gnupg()
clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

mbd_prepare()
classmethod mbd_sync()
mbd_remove()
mbd_get_dependencies()

All active or to-be active repositories, remotes and chroots

classmethod mbd_check()

Just warn in case there are no repos and no chroots

mbd_get_archive_origin()
mbd_dput_values()
mbd_dput_name()
mbd_get_dput_conf()

Get traditional dput.cf snippet

mbd_get_dputng_profile()

Get dput-ng profile

mbd_notify_event(event)
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class mini_buildd.models.Chroot(id, status, last_checked, source, architecture, debootstrap_command, debootstrap_extra_options, personality, personality_override)

Bases: StatusModel

PERSONALITIES = {'i386': 'linux32'}
source

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

architecture

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

debootstrap_command

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

debootstrap_extra_options

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

personality

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

personality_override

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

search_fields = ('source__codename', 'architecture__name')
readonly_fields = ('personality',)
property media
clean()

Forbid change source/arch on existing chroot (we would loose the path to the associated data)

mbd_key()
property mbd_path
mbd_get_backend()

Get actual class of (saved) instance (even if operating on base class Chroot only)

mbd_schroot_name()

Schroot name w/o namespace (see schroot --list)

Must produce same as schroot_name().

mbd_get_tmp_dir()
mbd_get_schroot_conf_file()
mbd_get_keyring_file()

Get keyring file path. Holds all keys from the source to verify the release via debootstrap’s –keyring option

mbd_get_system_schroot_conf_file()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence

mbd_workaround_debmirror_script()
mbd_get_sequence()
mbd_prepare()
mbd_remove()
mbd_sync()
mbd_backend_check()

Run backend check. Subclasses may implement this to do extra backend-specific checks

mbd_apt_line()
mbd_check()
mbd_get_dependencies()
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

architecture_id
btrfssnapshotchroot

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 a ReverseOneToOneDescriptor instance.

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 a ReverseOneToOneDescriptor instance.

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 a ReverseOneToOneDescriptor instance.

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 a ReverseOneToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>
source_id
class mini_buildd.models.DirChroot(*args, **kwargs)

Bases: Chroot

Directory chroot backend

UNION_AUFS = 0
UNION_OVERLAYFS = 1
UNION_UNIONFS = 2
UNION_OVERLAY = 3
UNION_CHOICES = ((0, 'aufs'), (1, 'overlayfs'), (2, 'unionfs'), (3, 'overlay'))
union_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: Admin

property media
mbd_backend_flavor()
mbd_get_chroot_dir()
mbd_get_schroot_conf()
mbd_get_post_sequence()
exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
get_union_type_display(*, field=<django.db.models.fields.IntegerField: union_type>)
class mini_buildd.models.FileChroot(*args, **kwargs)

Bases: Chroot

File chroot backend

COMPRESSION_NONE = 0
COMPRESSION_GZIP = 1
COMPRESSION_BZIP2 = 2
COMPRESSION_XZ = 3
COMPRESSION_CHOICES = ((0, 'no compression'), (1, 'gzip'), (2, 'bzip2'), (3, 'xz'))
compression

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

TAR_ARGS = {0: [], 1: ['--gzip'], 2: ['--bzip2'], 3: ['--xz']}
TAR_SUFFIX = {0: 'tar', 1: 'tar.gz', 2: 'tar.bz2', 3: 'tar.xz'}
class Admin(model, admin_site)

Bases: Admin

property media
mbd_backend_flavor()
mbd_get_tar_file()
mbd_get_schroot_conf()
mbd_get_post_sequence()
exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
get_compression_display(*, field=<django.db.models.fields.IntegerField: compression>)
class mini_buildd.models.LVMChroot(*args, **kwargs)

Bases: Chroot

LVM chroot backend

class Admin(model, admin_site)

Bases: Admin

property media
volume_group

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

filesystem

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

snapshot_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mbd_backend_flavor()
mbd_get_volume_group()
mbd_get_lvm_device()
mbd_get_schroot_conf()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence

mbd_get_post_sequence()
mbd_backend_check()

Run backend check. Subclasses may implement this to do extra backend-specific checks

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
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 a ReverseOneToOneDescriptor instance.

class mini_buildd.models.LoopLVMChroot(*args, **kwargs)

Bases: LVMChroot

Loop LVM chroot backend

class Admin(model, admin_site)

Bases: Admin

property media
loop_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

mbd_backend_flavor()
mbd_get_volume_group()
mbd_get_backing_file()
mbd_get_loop_device()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

lvmchroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

lvmchroot_ptr_id
class mini_buildd.models.BtrfsSnapshotChroot(*args, **kwargs)

Bases: Chroot

Btrfs Snapshot chroot backend

class Admin(model, admin_site)

Bases: Admin

property media
classmethod mbd_backend_flavor()
mbd_get_chroot_dir()
mbd_get_snapshot_dir()
mbd_get_schroot_conf()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence

mbd_get_post_sequence()
exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
class mini_buildd.models.Subscription(id, subscriber, package, distribution)

Bases: Model

subscriber

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

package

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

distribution

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
subscriber_id
mini_buildd.models.mbd_icodenames()