aptsources.sourceslist
— Provide an abstraction of the sources.list¶
Note
This part of the documentation is created automatically.
- class aptsources.sourceslist.Deb822SourceEntry(section: Optional[Union[Section, str]], file: str)¶
- property architectures¶
The list of architectures
- property comps¶
Components in the source
- property dist¶
Suites in the source
- property suites¶
Suites in the source
- property type¶
The list of types
- property types¶
The list of types
- property uri¶
URIs in the source
- property uris¶
URIs in the source
- class aptsources.sourceslist.NullMatcher¶
a Matcher that does nothing
- match(s: Union[SourceEntry, Deb822SourceEntry]) bool ¶
- class aptsources.sourceslist.SourceEntry(line: str, file: Optional[str] = None)¶
single sources.list entry
- static mysplit(line: str) List[str] ¶
a split() implementation that understands the sources.list format better and takes [] into account (for e.g. cdroms)
- class aptsources.sourceslist.SourceEntryMatcher(matcherPath: str)¶
matcher class to make a source entry look nice lots of predefined matchers to make it i18n/gettext friendly
- match(source: Union[SourceEntry, Deb822SourceEntry]) bool ¶
Add a matching template to the source
- class aptsources.sourceslist.SourcesList(withMatcher: bool = True, matcherPath: str = '/usr/share/python-apt/templates/', *, deb822: bool = False)¶
represents the full sources.list + sources.list.d file
- add(type: str, uri: str, dist: str, orig_comps: List[str], comment: str = '', pos: int = -1, file: Optional[str] = None, architectures: Iterable[str] = []) Union[SourceEntry, Deb822SourceEntry] ¶
Add a new source to the sources.list. The method will search for existing matching repos and will try to reuse them as far as possible
- backup(backup_ext: Optional[str] = None) str ¶
make a backup of the current source files, if no backup extension is given, the current date/time is used (and returned)
- check_for_relations(sources_list: Iterable[Union[SourceEntry, Deb822SourceEntry]]) Tuple[List[Union[SourceEntry, Deb822SourceEntry]], Dict[Template, List[Union[SourceEntry, Deb822SourceEntry]]]] ¶
get all parent and child channels in the sources list
- remove(source_entry: SourceEntry) None ¶
remove the specified entry from the sources.list