mini_buildd.models.source module

class mini_buildd.models.source.Archive(extra_options, pickled_data, url, ping)

Bases: mini_buildd.models.base.Model

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: mini_buildd.models.base.Admin

search_fields = ['url']
exclude = ('extra_options',)
classmethod mbd_meta_add_local(msglog)

Local scan for archives.

This currently scans the local sources list and tries to detect a local apt-cacher-ng.

classmethod mbd_meta_add_debian(msglog)

Add internet Debian archive sources.

classmethod mbd_meta_add_ubuntu(msglog)

Add internet Ubuntu archive sources.

media
clean(*args, **kwargs)

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_get_matching_release(request, source, gnupg)
mbd_ping(request)

Ping and update the ping value.

mbd_get_reverse_dependencies()

Return all sources (and their deps) that use us.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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.source.Architecture(extra_options, pickled_data, name)

Bases: mini_buildd.models.base.Model

name

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

classmethod mbd_host_architecture()
classmethod mbd_supported_architectures(arch=None)

Get all supported architectures (some archs also natively support other archs).

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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.source.Component(extra_options, pickled_data, name)

Bases: mini_buildd.models.base.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: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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.

mini_buildd.models.source.component_key(component)

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.

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

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.

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.

description

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.

codeversion_override

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: mini_buildd.models.base.Admin

list_display = ['colored_status', '__str__', 'origin', 'codeversion', 'codename']
search_fields = ['origin', 'codeversion', 'codename']
ordering = ['origin', '-codeversion', 'codename']
readonly_fields = ['codeversion', 'archives', 'components', 'architectures', 'description']
fieldsets = (('Identity', {'fields': ('origin', 'codename', 'extra_options', 'apt_keys')}), ('Extra', {'classes': ('collapse',), 'fields': ('description', 'codeversion', 'codeversion_override', 'archives', 'components', 'architectures')}))
filter_horizontal = ('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).

classmethod mbd_meta_add_debian(msglog)

Add well-known Debian sources.

To display the key ids via apt-key in the format as used here:

apt-key adv --list-public-keys --keyid-format=long
classmethod mbd_meta_add_ubuntu(msglog)

Add well-known Ubuntu sources. Update hint: Keep latest two releases plus a couple of LTS releases.

classmethod mbd_filter_active_base_sources()

Filter active base sources; needed in chroot and distribution wizards.

media
mbd_release_file_values()

Compute a dict of values a matching release file must have.

mbd_is_matching_release(request, release)

Check that this release file matches us.

mbd_get_archive()

Get fastest archive.

mbd_get_apt_line_raw(components, prefix='deb ')
mbd_get_apt_line(distribution, prefix='deb ')
mbd_get_apt_pin()

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

mbd_prepare(request)
mbd_sync(request)
mbd_remove(_request)
mbd_check(request)

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.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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.source.PrioritySource(id, extra_options, pickled_data, source, priority)

Bases: mini_buildd.models.base.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: mini_buildd.models.base.Admin

exclude = ('extra_options',)
classmethod mbd_meta_add_extras(msglog)

Add all backports as prio=1 prio sources.

media
mbd_get_apt_preferences()
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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

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