Fix the test suite by adding new "m" flags to debug output
In "Restore ?garbage by calling MarkAndSweep before parsing" I
made install code run MarkAndSweep before parsing arguments such
that the "?garbage" pattern works correctly.
This caused test suite breakage because packages now ended up
with marked flags in the debug output. Hence add "m" to the output
we assert where necessary.
In a nicer world we might want to just do MarkAndSweep if we actually
have a ?garbage pattern to evaluate but that is a bit unpredictable
in terms of performance expectations and because a "read-only" construct
modifies the depcache, so let's go with the more expected option for now
Regression-of: b6f362e8013b03efce54e7381e0e22fac1fa1539
Initial support for snapshot servers, apt --snapshot option
Provide snapshot support for offical Debian and Ubuntu archives.
There are two ways to enable snapshots for sources:
1. Add Snapshot: yes to your sources file ([snapshot=yes]). This
will allow you to specify a snapshot to use when updating or
installing using the --snapshot,-S option.
2. Add Snapshot: ID to your sources files to request a specific
snapshot for this source.
Snapshots are discovered using Label and Origin fields in the Release
file of the main source, hence you need to have updated the source at
least once before you can use snapshots.
The Release file may also declare a snapshots server to use, similar
to Changelogs, it can contain a Snapshots field with the values:
1. `Snapshots: https://example.com/@SNAPSHOTID@` where `@SNAPSHOTID@`
is a placeholder that is replaced with the requested snapshot id
2. `Snapshots: no` to disable snapshot support for this source.
Requesting snapshots for this source will result in a failure
to load the source.
The implementation adds a SHADOWED option to deb source entries,
and marks the main entry as SHADOWED when a snapshot has been
requested, which will cause it to be updated, but not included
in the generated cache.
The concern here was that we need to keep generating the shadowed
entries because the cleanup in `apt update` deletes any files not
queued for download, so we gotta keep downloading the main source.
This design is not entirely optimal, but avoids the pitfalls of
having to reimplement list cleanup.
Gaps:
- Ubuntu Pro repositories and PPAs are not yet supported.
(cherry picked from commit a19f606aad717fe5c9c69237c3af53feb547115e)