aptsources.distinfo — provide meta information for distro repositories

Note

This part of the documentation is created automatically.

class aptsources.distinfo.Component(name: str, desc: Optional[str] = None, long_desc: Optional[str] = None, parent_component: Optional[str] = None)
get_description() Optional[str]
get_description_long() Optional[str]
get_parent_component() Optional[str]
set_description(desc: str) None
set_description_long(desc: str) None
set_parent_component(parent: str) None
class aptsources.distinfo.DistInfo(dist: Optional[str] = None, base_dir: str = '/usr/share/python-apt/templates')
finish_template(template: Template, component: Optional[Component]) None

finish the current tempalte

class aptsources.distinfo.Mirror(proto: str, hostname: str, dir: str, location: Optional[str] = None)

Storage for mirror related information

add_repository(proto: str, dir: str) None
get_location() Optional[str]
get_repo_urls() List[str]
get_repositories_for_proto(proto: str) List[Repository]
has_repository(proto: str, dir: str) bool
set_location(location: str) None
class aptsources.distinfo.Repository(proto: str, dir: str)
get_info() Tuple[str, str]
get_url(hostname: str) str
class aptsources.distinfo.Template
has_component(comp: str) bool

Check if the distribution provides the given component

is_mirror(url: str) bool

Check if a given url of a repository is a valid mirror

aptsources.distinfo.split_url(url: str) List[str]

split a given URL into the protocoll, the hostname and the dir part