** Description changed:

  [ Impact ]
  
  The Noble-to-Resolute upgrade fails in our CI during calculation on desktop 
flavors
  that have `lintian` installed. The failure occurs before package downloads:
  
    ERROR Could not calculate the upgrade. An unresolvable problem occurred 
while
    calculating the upgrade.
    ERROR Dist-upgrade failed: 'E:Error, pkgProblemResolver::Resolve generated
    breaks, this may be caused by held packages.'
  
  [ Test Plan ]
  
- Set up a fresh desktop container with lintian installed 
+ Set up a fresh desktop container with lintian installed
  ```bash
  lxc launch ubuntu:24.04 test
  lxc shell test
  cloud-init status --wait
  apt update && apt upgrade -y
  apt install ubuntu-desktop -y
+ netplan apply
  apt install lintian -y
  ```
  
  Reproduce the issue:
  
  ```bash
  do-release-upgrade
  ```
  (Expected to fail,  less /var/log/dist-upgrade/apt.log to see the deadlock)
  
  Confirm the fix:
  
  ```bash
  do-release-upgrade -p
  ```
  (It proceeds normally)
  
  [ Where problems could occur ]
  
  One problem that I could see happening is that the early resolution
  helps the upgrade fail faster without having to go through the full
  marked set, this needs to be discussed with U-R-U maintainers before
  proceeding.
  
  [ Other Info ]
  
  1. The quirk added for LP: #2150319 marks libfile-libmagic-perl for
  install (DistUpgradeQuirks.py:387).
  
  2. In resolute, libfile-libmagic-perl 1.23-2build2 depends on perl (>=
  5.40.0-6), so marking it pulls perl 5.40.1-7ubuntu0.4 and related Perl
  upgrades.
  
  3. BaseMetaPkgs is then processed (DistUpgradeCache.py:587); its
  mark_install() call uses the default auto_fix=True
  (DistUpgradeCache.py:832-833), running the strict resolver over the
  broken marked set.
  
  4. The resolver hits a conflict with lintian: a newer libyaml-libyaml-
  perl (0.904.0+ds-1) breaks the installed lintian, so it tries upgrading
  lintian to 2.129.0ubuntu2.2. That version needs libdistro-info-perl >=
  1.15ubuntu0.1~, but the resolver chooses not to upgrade it and holds
  lintian back, leaving the state unresolved and aborting
  (DistUpgradeCache.py:861).
  
  TLDR; The resolver is given a choice between upgrading a package or
  holding it back for minimal change and it chooses to hold it back the
  cycle goes:
  
  libfile-libmagic-perl -> perl -> libyaml-libyaml-perl -> Breaks Lintian
  which needs a libdistro-info-perl which the resolver doesn't choose to
  do
  
  Note:
  
  Ubuntu server upgrades skip _installMetaPkgs()
  (DistUpgradeCache.py:595), and the standard ubuntu-desktop metapackage
  doesn't pull in lintian; together these explain why the usual server and
  desktop CI paths don't reproduce the bug.
  
  [ References ]
  
  LP: #2150319 - https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-
  upgrader/+bug/2150319

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

Title:
  [SRU] noble→resolute: lintian quirk triggers early resolver failures

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2174997/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to