repoman.writer#

DEB822 serialiser for Repository objects. Pure — no I/O, no GTK.

repo_to_deb822(repo)[source]#

Serialise a Repository to a DEB822 string.

Called by the polkit helper (and by converter.py) — never writes directly. Preserves field ordering: Types, URIs, Suites, Components, Enabled, Signed-By (if present), X-Repolib-Name (if present).

Parameters:

repo (Repository)

Return type:

str

enable_patch(repo, codename)[source]#

Return a dict of field updates to re-enable a repo for codename. Passed as part of the JSON payload to the polkit helper.

Parameters:
Return type:

dict