mini_buildd.models.source module¶
- class mini_buildd.models.source.Archive(extra_options, pickled_data, 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.
- 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_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
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 mini_buildd.models.source.Architecture(extra_options, pickled_data, 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 aReverseManyToOneDescriptor
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 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_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.
- 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
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 mini_buildd.models.source.Component(*args, **kwargs)¶
Bases:
Model
A Debian component (like ‘main’, ‘contrib’, ‘non-free’).
Sorting: ‘main’ should be first, the others in no special order. You may just use standard python sorted() on an iterable of components.
- 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
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.
- 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
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 mini_buildd.models.source.Source(id, extra_options, pickled_data, status, last_checked, auto_reactivate, origin, codename, description, codeversion, codeversion_override)¶
Bases:
StatusModel
- MBD_HELP_EXTRA_OPTIONS = "\n=================================================\nOrigin, Codename, Suite, Archive, Version, Label\n=================================================\nIf needed, you may use these fields (same as in a Release file) to\nfurther specify this source. These are also later used to pin the\nsource via apt.\n\nFor some sources, ``Codename`` (as we use it above) does\nnot match resp. value as given in the Release file. When\n``Codename`` is overridden in this manner, be sure to also\nadd one further flag to identify the source -- else apt pinning later\nwould likely not be unambiguous. Real world examples that need this\nextra handling are ``Debian Security`` (``buster`` or\nolder), ``Ubuntu Security and Backports``:\n---\nCodename: bionic\nSuite: bionic-backports\n---\n=================================================\nX-Check-Valid-Until: no\n=================================================\nSome sources have a ``Valid-Until`` field that is no longer\nupdated. If you really still want to use it anyway, use:\n---\nX-Check-Valid-Until: no\n---\nThis will, 1st, ignore mini-buildd's own 'Valid-Until check' and 2nd,\ncreate apt lines for this source with the ``[check-valid-until=no]``\noption. I.e., at least from ``stretch`` onwards, the check is disabled\nper source. For ``jessie`` or worse (where this apt option does not\nwork), a global workaround via schroot is still in place.\n\n=================================================\nX-Remove-From-Component: <prefix>\n=================================================\nSome (actually, we only know of ``Debian Security``) sources\nhave weird ``Components`` that need to be fixed to work with\nmini-buildd. For example, ``Debian Security`` (buster or older)\nneeds:\n\n---\nCodename: stretch\nLabel: Debian-Security\nX-Remove-From-Component: updates/\n---\n\nFwiw, in ``Debian Security`` for ``bullseye`` or\nyounger, Codename is now unambiguous (like\n``bullseye-security``), but the component oddity remains; so\nthese cases still need:\n\n---\nX-Remove-From-Component: updates/\n---\n"¶
- 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
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.
- 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
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.
- 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.
- 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.
- class Admin(*args, **kwargs)¶
Bases:
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']¶
- 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_filter_active_base_sources()¶
Filter active base sources; needed in chroot and distribution wizards.
- property media¶
- mbd_release_file_values()¶
Compute a dict of values a matching release file must have.
- 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(*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.
- 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 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_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.
- 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 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.PrioritySource(id, extra_options, pickled_data, 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 aForwardManyToOneDescriptor
instance.
- priority¶
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
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.
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mbd_get_apt_preferences()¶
- objects = <django.db.models.manager.Manager object>¶
- source_id¶