diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2023-11-20 10:02:21 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2023-11-20 10:04:05 +0100 |
| commit | b6f362e8013b03efce54e7381e0e22fac1fa1539 (patch) | |
| tree | a93619c3df86e5a5b1bb7194d9072251828e5b57 /apt-private | |
| parent | 1f5ecf5d211a073892e05047becd4e55f3e055c9 (diff) | |
Restore ?garbage by calling MarkAndSweep before parsing
This ensures that things work correctly.
LP: #1995790
Diffstat (limited to 'apt-private')
| -rw-r--r-- | apt-private/private-install.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index e366634ad..2f254ca27 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -669,6 +669,9 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg fallback = MOD_REMOVE; } + // We need to MarkAndSweep before parsing commandline so that ?garbage pattern works correctly. + Cache->MarkAndSweep(); + std::list<APT::VersionSet::Modifier> mods; mods.push_back(APT::VersionSet::Modifier(MOD_INSTALL, "+", APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::CANDIDATE)); |
