so that parsing CD ROM repositories with spaces in the name works too.
But it's not limited to that, and should make one-line parsing rather
similar to what APT does (stanza parsing in APT doesn't use
ParseQuoteWord at all AFAICS).
Fabian Ebner [Wed, 30 Jun 2021 15:07:53 +0000 (17:07 +0200)]
standard repos: allow conversion from handle and improve information
Add a description for the handle, which can be useful to display
alongside the name. The descriptions are essentially the first
sentence from PVE's "Package Repositories" docs, but without the
product name.
Also drop the " Repository" suffix from the names, as it's not useful,
but can be ugly: e.g. for the UI when the label already is
'Repository:'.
Fabian Ebner [Wed, 30 Jun 2021 10:20:16 +0000 (12:20 +0200)]
add get_cached_origin method and an initial config module
Allows obtaining the 'Origin' property from the cached InRelease file.
Used the once_cell crate for the config module, because it is already
used in proxmox-backup and seemed to be the right fit here.
For now, the config module is just used to be able to override the
path for the test environment, but those are actual APT config
variables, and in the future, it can be extended and used to actually
parse the apt.conf(.d/*) on the system.