[Bug 2129819] Re: apt 3.0 solver backtracking

Julian Andres Klode 2129819 at bugs.launchpad.net
Sat Oct 25 20:12:51 UTC 2025


** Description changed:

- Back tracking stuff to be fixed
+ [Impact]
+ The autoremove command inadvertently removed more packages than necessary as the manual bit was not correctly moved from meta packages to their dependencies when the metapackage was being removed due to a dependency being removed.
+ 
+ [Test plan]
+ APT's rigorous integration and regression test suite will include a fix for this instance, ensuring it does not happen again.
+ 
+ [Where problems could occur]
+ The patch changes the code that marks packages for deletion to record that they were being marked for removal as a result of exhausting all options to installing them and hence backtracking.
+ 
+ This means we now pass FromUser=false to the MarkDelete() in more
+ places, which can lead to bugs like
+ 
+ https://salsa.debian.org/apt-
+ team/apt/-/merge_requests/527/diffs?commit_id=254ba81131a5360b15905dad8174cea640b8736d
+ 
+ Which cause the translation of the solver result to be incomplete,
+ potentially causing a regression in reporting quality for errors (but
+ not correctness).
+ 
+ However, while a regression in reporting quality would be unfortunate,
+ removing packages we should not be removing is worse.

** Also affects: apt (Ubuntu Questing)
   Importance: Undecided
       Status: New

** Also affects: apt (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Changed in: apt (Ubuntu Resolute)
       Status: New => Triaged

** Changed in: apt (Ubuntu Questing)
       Status: New => Triaged

** Summary changed:

- apt 3.0 solver backtracking
+ apt 3.0 solver backtracking loss of information causes removals to be marked as "from user", breaking metapackages handling

** Summary changed:

- apt 3.0 solver backtracking loss of information causes removals to be marked as "from user", breaking metapackages handling
+ apt 3.0 solver accidentally removes dependencies of metapackages when removing a metapackage due to removing one of its dependencies.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/2129819

Title:
  apt 3.0 solver accidentally removes dependencies of metapackages when
  removing a metapackage due to removing one of its dependencies.

Status in apt package in Ubuntu:
  Triaged
Status in apt source package in Questing:
  Triaged
Status in apt source package in Resolute:
  Triaged

Bug description:
  [Impact]
  The autoremove command inadvertently removed more packages than necessary as the manual bit was not correctly moved from meta packages to their dependencies when the metapackage was being removed due to a dependency being removed.

  [Test plan]
  APT's rigorous integration and regression test suite will include a fix for this instance, ensuring it does not happen again.

  [Where problems could occur]
  The patch changes the code that marks packages for deletion to record that they were being marked for removal as a result of exhausting all options to installing them and hence backtracking.

  This means we now pass FromUser=false to the MarkDelete() in more
  places, which can lead to bugs like

  https://salsa.debian.org/apt-
  team/apt/-/merge_requests/527/diffs?commit_id=254ba81131a5360b15905dad8174cea640b8736d

  Which cause the translation of the solver result to be incomplete,
  potentially causing a regression in reporting quality for errors (but
  not correctness).

  However, while a regression in reporting quality would be unfortunate,
  removing packages we should not be removing is worse.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2129819/+subscriptions




More information about the foundations-bugs mailing list