** Description changed:

  [ Impact ]
  
- A regression in our CI is observed for the Noble→Resolute upgrade. On
- Noble systems with `lintian` installed, the upgrade to Resolute fails
- during calculation, before packages are downloaded.
+ The Noble-to-Resolute upgrade fails during calculation on some desktop systems
+ that have `lintian` installed. The failure occurs before package downloads:
  
- `main.log` shows:
+   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.'
  
- ```text
- 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.'
- ```
- 1. The quirk added for LP: #2150319 marks libfile-libmagic-perl for install. 
(DistUpgradeQuirks.py:~303, :~330)
+ `lintian` is not installed by default, but `ubuntu-unity-desktop` recommends
+ `gdebi`, which in turn recommends `lintian`. This explains why the regression
+ appears in some desktop upgrade tests but not in the standard `ubuntu-desktop`
+ CI path.
  
- 2. Resolute's libfile-libmagic-perl 1.23-2build2 depends on perl (>=
- 5.40.0-6), so the mark pulls perl 5.40.1-7ubuntu0.4 and the rest of the
- perl 5.40 upgrades into the Noble cache.
+ [ Root Cause ]
  
- 3. The cache is therefore already broken when BaseMetaPkgs is processed.
- (DistUpgradeCache.py:~587)
+ 1. The quirk added for LP: #2150319 marks `libfile-libmagic-perl` for install
+    (`DistUpgradeQuirks.py:387`). Although the quirk passes `auto_fix=False`,
+    python-apt still marks the package's dependencies recursively.
  
- 4. The BaseMetaPkgs loop calls mark_install() with auto_fix enabled,
- running the strict resolver over the whole cache.
- (DistUpgradeCache.py:832, :833)
+ 2. The Resolute version, `libfile-libmagic-perl 1.23-2build2`, depends on
+    `perl (>= 5.40.0-6)`. Marking it pulls `perl 5.40.1-7ubuntu0.4` and related
+    Perl upgrades into the Noble cache, leaving the cache broken.
  
- 5. The resolver tries to upgrade lintian 2.117.0ubuntu1.6 to
- 2.129.0ubuntu2.2 because libyaml-libyaml-perl 0.904.0+ds-1 breaks the
- old version, but the new lintian needs libdistro-info-perl
- 1.15ubuntu0.1. It holds lintian back rather than upgrade libdistro-info-
- perl 1.7ubuntu0.1, and the upgrade aborts. (DistUpgradeCache.py:~860)
+ 3. The cache is already broken when `BaseMetaPkgs` is processed
+    (`DistUpgradeCache.py:587`). That loop calls `mark_install()` with its
+    default `auto_fix=True` (`DistUpgradeCache.py:832-833`), invoking the 
strict
+    resolver over the cache.
  
- `lintian` is not installed by default, but some desktop metapackages pull it 
in
- indirectly: `ubuntu-unity-desktop` recommends `gdebi`, and `gdebi` recommends
- `lintian`.
+ 4. The resolver encounters a conflict involving `lintian`:
+    `libyaml-libyaml-perl 0.904.0+ds-1` breaks the installed `lintian` version,
+    so the resolver tries to upgrade `lintian` to `2.129.0ubuntu2.2`. The new
+    `lintian` requires `libdistro-info-perl >= 1.15ubuntu0.1~`, but the 
resolver
+    holds `lintian` back rather than upgrading `libdistro-info-perl` from
+    `1.7ubuntu0.1`. The resulting unresolved state aborts the upgrade
+    calculation (`DistUpgradeCache.py:861`).
+ 
+ 5. The `BaseMetaPkgs` loop does not catch `SystemError`, so the exception
+    escapes `distUpgrade()` and `self.upgrade(True)` is never reached.
+ 
+ [ Why Servers Are Unaffected ]
+ 
+ The server path skips `_installMetaPkgs()`; the desktop path runs it after the
+ pre-upgrade quirks and before the full upgrade calculation:
+ 
+   self.pre_upgrade_rule()
+   self._keepBaseMetaPkgsInstalled(view)
+   if not serverMode:
+       self._installMetaPkgs(view)
+   self.upgrade(True)
+ 
+ In addition, the standard `ubuntu-desktop` metapackage does not pull in
+ `lintian`. These two facts explain why server upgrades and the standard 
desktop
+ CI path are unaffected.
+ 
+ [ Verification ]
+ 
+ - Stock `26.04.27` U-R-U: fails during calculation.
+ - `26.04.18` release-pocket upgrader (without the quirk): passes calculation.
+ - `26.04.27` with the quirk disabled: passes calculation.
+ - `26.04.27` with the quirk disabled and `BaseMetaPkgs` using
+   `mark_install(auto_fix=False)`: completes the full upgrade.
+ 
+ The successful full run ended on Ubuntu 26.04.1 LTS with `lintian
+ 2.129.0ubuntu2.2`, `libdistro-info-perl 1.15ubuntu0.1`,
+ `libyaml-libyaml-perl 0.904.0+ds-1`, `libfile-libmagic-perl 1.23-2build2`, and
+ `perl 5.40.1-7ubuntu0.4`. `dpkg --audit` was empty and `apt-get check` passed.
+ 
+ [ Proposed Fix ]
+ 
+ Do not run the strict resolver while marking the base metapackages for
+ installation:
+ 
+   - self[pkg].mark_install()
+   + self[pkg].mark_install(auto_fix=False)
+ 
+ The quirk should also be revisited or removed. If it must remain for older
+ archive snapshots, it should not pull the Perl upgrade into the cache before
+ the full upgrade set is calculated.
  
  [ Test Plan ]
  
- 1. Create a Noble container, install the desktop set that pulls in lintian, 
and
-    fix up networking (installing the desktop pulls in NetworkManager, which 
can
-    leave the container without DNS):
+ Reproduce:
  
-    ```bash
-    lxc launch ubuntu:24.04 uru-lintian-quirk
-    lxc exec uru-lintian-quirk -- cloud-init status --wait
-    lxc exec uru-lintian-quirk -- bash -c \
-      'apt-get update -qq && DEBIAN_FRONTEND=noninteractive \
-       apt-get -y install ubuntu-unity-desktop'
-    lxc exec uru-lintian-quirk -- netplan apply
-    ```
+ 1. Create a Noble container, install a desktop set that pulls in `lintian`, 
and
+    restore networking if NetworkManager leaves the container without DNS:
  
- 2. Download the affected upgrader inside the container and run it
- directly:
+      lxc launch ubuntu:24.04 uru-lintian-quirk
+      lxc exec uru-lintian-quirk -- cloud-init status --wait
+      lxc exec uru-lintian-quirk -- bash -c \
+        'apt-get update -qq && DEBIAN_FRONTEND=noninteractive \
+         apt-get -y install ubuntu-unity-desktop'
+      lxc exec uru-lintian-quirk -- netplan apply
  
-    ```bash
-    lxc exec uru-lintian-quirk -- rm -rf /var/log/dist-upgrade /tmp/resolute 
/tmp/resolute.tar.gz
+ 2. Download and run the affected upgrader in the container:
  
-    lxc exec uru-lintian-quirk -- curl -4fL -o /tmp/resolute.tar.gz \
-      
http://archive.ubuntu.com/ubuntu/dists/resolute-updates/main/dist-upgrader-all/current/resolute.tar.gz
+      lxc exec uru-lintian-quirk -- rm -rf /var/log/dist-upgrade
+ /tmp/resolute /tmp/resolute.tar.gz
  
-    lxc exec uru-lintian-quirk -- bash -c \
-      'mkdir -p /tmp/resolute && tar xzf /tmp/resolute.tar.gz -C /tmp/resolute 
\
-         && grep VERSION /tmp/resolute/DistUpgradeVersion.py'
+      lxc exec uru-lintian-quirk -- curl -4fL -o /tmp/resolute.tar.gz \
+        
http://archive.ubuntu.com/ubuntu/dists/resolute-updates/main/dist-upgrader-all/current/resolute.tar.gz
  
-    lxc exec uru-lintian-quirk -- bash -c \
-      'rm -f /var/run/reboot-required*; cd /tmp/resolute && \
-       python3 dist-upgrade.py --mode=desktop \
-         --frontend=DistUpgradeViewNonInteractive'
-    ```
+      lxc exec uru-lintian-quirk -- bash -c \
+        'mkdir -p /tmp/resolute && tar xzf /tmp/resolute.tar.gz -C 
/tmp/resolute \
+           && grep VERSION /tmp/resolute/DistUpgradeVersion.py'
  
- 3. Check the logs:
+      lxc exec uru-lintian-quirk -- bash -c \
+        'rm -f /var/run/reboot-required*; cd /tmp/resolute && \
+         python3 dist-upgrade.py --mode=desktop \
+           --frontend=DistUpgradeViewNonInteractive'
  
-    ```bash
-    lxc exec uru-lintian-quirk -- bash -c \
-      'grep -iE "Quirk: Marking|Could not calculate|Resolve generated|Holding 
Back lintian" \
-         /var/log/dist-upgrade/main.log /var/log/dist-upgrade/apt.log'
-    ```
+ 3. Check the upgrade logs for the quirk, resolver failure, and held-back
+    package:
  
- This fails with `Resolve generated breaks`. The `26.04.18` release-pocket
- tarball does not have the quirk and passes calculation.
- 
- To test a fix, disable the quirk first; that is enough to get past 
calculation.
- I also changed the base loop to `mark_install(auto_fix=False)`, and that run
- completed the full upgrade.
- 
- [ Other Info ]
- 
- 1. The quirk marks `libfile-libmagic-perl` with `auto_fix=False`, but 
python-apt
-    still marks dependencies recursively.
- 
- 2. This pulls `perl 5.40.1-7ubuntu0.4` and leaves the cache broken (50 
packages
-    on one testbed, 6 on a smaller container; the number depends on what is
-    installed).
- 
- 3. `DistUpgradeCache._installMetaPkgs()` calls `mark_install()` for each
-    `BaseMetaPkgs` entry:
- 
-    ```python
-    for pkg in self.config.getlist("Distro", "BaseMetaPkgs"):
-        self[pkg].mark_install()
-        apt.ProblemResolver(self).protect(self[pkg])
-    ```
- 
- 4. Because the broken count is non-zero, `mark_install()` calls
-    `pkgProblemResolver::Resolve(true)` over the whole cache. The resolver
-    upgrades `lintian` because `libyaml-libyaml-perl` breaks the old version,
-    then refuses to upgrade `libdistro-info-perl` for the new `lintian`:
- 
-    ```text
-    Broken libyaml-libyaml-perl:amd64 Breaks on lintian:amd64 < 
2.117.0ubuntu1.6 | 2.129.0ubuntu2.2 @ii umH > (< 2.119.0~)
-      Considering lintian:amd64 -1 as a solution to libyaml-libyaml-perl:amd64 
1
-      Upgrading lintian:amd64 due to Breaks field in libyaml-libyaml-perl:amd64
-    Broken lintian:amd64 Depends on libdistro-info-perl:amd64 < 1.7ubuntu0.1 | 
1.15ubuntu0.1 @ii umH > (>= 1.15ubuntu0.1~)
-      Considering libdistro-info-perl:amd64 0 as a solution to lintian:amd64 -1
-      MarkKeep lintian:amd64 < 2.117.0ubuntu1.6 -> 2.129.0ubuntu2.2 @ii umU Ib 
> FU=0
-      Holding Back lintian:amd64 rather than change libdistro-info-perl:amd64
-    ```
- 
- 5. The loop has no `try/except SystemError`, so the exception escapes
-    `distUpgrade()` and `self.upgrade(True)` is never reached.
- 
- 6. This has the same shape as LP: #2150319: an unphased `Breaks` forces an
-    upgrade that apt will not complete. Here, the quirk itself triggers the 
perl
-    upgrade that breaks the cache before the base loop runs. The original bug 
caused an upgrade failure because APT was given the choice between installing a 
new package or holding back the upgrade and it chose (incorrectly) to hold back 
on the upgrade, here it is similar in that `APT` chose to not upgrade to 
`libdistro-info-perl 1.15ubuntu0.1` which held back `lintian`'s upgrade and 
caused a deadlock.
- 
- 7. There is an interesting branch taken that's only taken when a desktop
- metapackage is installed (serverMode == false)
- 
- ```python
- # DistUpgradeCache.py:~587
- self.pre_upgrade_rule()            # quirks run, including the lintian quirk
- self._keepBaseMetaPkgsInstalled(view)
- if not serverMode:
-     self._installMetaPkgs(view)    # skipped in server mode
- self.upgrade(True)                 # full dist-upgrade calculation
- ```
- 
- Which is why server is not affected, and I checked ubuntu-desktop and it
- doesn't seem to have lintian either directly or indirectly which is why
- ubuntu-desktop passes in the CI
+      lxc exec uru-lintian-quirk -- bash -c \
+        'grep -iE "Quirk: Marking|Could not calculate|Resolve 
generated|Holding Back lintian" \
+           /var/log/dist-upgrade/main.log /var/log/dist-upgrade/apt.log'
  
  
+ [ Workarounds ]
  
- The failure in the original bug and this one are in that 
self._installMetaPkgs(view) call
+ Either remove `lintian` or upgrade `libdistro-info-perl` before starting the
+ release upgrade:
  
- Results from the A/B runs:
+   apt-get -y purge lintian
  
- - Stock `26.04.27`: fails during calculation.
- - `26.04.18` release pocket: passes calculation; it does not contain the 
quirk.
- - `26.04.27`, quirk disabled: passes calculation.
- - `26.04.27`, quirk disabled and `BaseMetaPkgs` using `auto_fix=False`: full
-   upgrade completes.
+   # or
+   apt-get -y install --only-upgrade libdistro-info-perl
  
- The full run ended on Ubuntu 26.04.1 LTS with `lintian 2.129.0ubuntu2.2`,
- `libdistro-info-perl 1.15ubuntu0.1`, `libyaml-libyaml-perl 0.904.0+ds-1`,
- `libfile-libmagic-perl 1.23-2build2`, and `perl 5.40.1-7ubuntu0.4`.
- `dpkg --audit` was empty and `apt-get check` was clean.
+ [ References ]
  
- My suggested fix is to avoid running the strict resolver on the base
- meta-packages:
- 
- ```diff
- -            self[pkg].mark_install()
- +            self[pkg].mark_install(auto_fix=False)
- ```
- 
- The quirk should also be revisited or removed. If it has to stay for older
- archive snapshots, it should not pull the perl upgrade before the full
- upgrade set is calculated.
- 
- Workarounds for users:
- 
- ```bash
- apt-get -y purge lintian
- # or
- apt-get -y install --only-upgrade libdistro-info-perl
- ```
- 
- Original references: LP: #2150319,
- https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2150319
+ LP: #2150319 - https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-
+ upgrader/+bug/2150319

** Description changed:

  [ Impact ]
  
- The Noble-to-Resolute upgrade fails during calculation on some desktop systems
+ The Noble-to-Resolute upgrade fails in our CI during calculation on most 
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.'
+   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.'
  
  `lintian` is not installed by default, but `ubuntu-unity-desktop` recommends
  `gdebi`, which in turn recommends `lintian`. This explains why the regression
  appears in some desktop upgrade tests but not in the standard `ubuntu-desktop`
  CI path.
  
  [ Root Cause ]
  
  1. The quirk added for LP: #2150319 marks `libfile-libmagic-perl` for install
-    (`DistUpgradeQuirks.py:387`). Although the quirk passes `auto_fix=False`,
-    python-apt still marks the package's dependencies recursively.
+    (`DistUpgradeQuirks.py:387`). Although the quirk passes `auto_fix=False`,
+    python-apt still marks the package's dependencies recursively.
  
  2. The Resolute version, `libfile-libmagic-perl 1.23-2build2`, depends on
-    `perl (>= 5.40.0-6)`. Marking it pulls `perl 5.40.1-7ubuntu0.4` and related
-    Perl upgrades into the Noble cache, leaving the cache broken.
+    `perl (>= 5.40.0-6)`. Marking it pulls `perl 5.40.1-7ubuntu0.4` and related
+    Perl upgrades into the Noble cache, leaving the cache broken.
  
  3. The cache is already broken when `BaseMetaPkgs` is processed
-    (`DistUpgradeCache.py:587`). That loop calls `mark_install()` with its
-    default `auto_fix=True` (`DistUpgradeCache.py:832-833`), invoking the 
strict
-    resolver over the cache.
+    (`DistUpgradeCache.py:587`). That loop calls `mark_install()` with its
+    default `auto_fix=True` (`DistUpgradeCache.py:832-833`), invoking the 
strict
+    resolver over the cache.
  
  4. The resolver encounters a conflict involving `lintian`:
-    `libyaml-libyaml-perl 0.904.0+ds-1` breaks the installed `lintian` version,
-    so the resolver tries to upgrade `lintian` to `2.129.0ubuntu2.2`. The new
-    `lintian` requires `libdistro-info-perl >= 1.15ubuntu0.1~`, but the 
resolver
-    holds `lintian` back rather than upgrading `libdistro-info-perl` from
-    `1.7ubuntu0.1`. The resulting unresolved state aborts the upgrade
-    calculation (`DistUpgradeCache.py:861`).
+    `libyaml-libyaml-perl 0.904.0+ds-1` breaks the installed `lintian` version,
+    so the resolver tries to upgrade `lintian` to `2.129.0ubuntu2.2`. The new
+    `lintian` requires `libdistro-info-perl >= 1.15ubuntu0.1~`, but the 
resolver
+    holds `lintian` back rather than upgrading `libdistro-info-perl` from
+    `1.7ubuntu0.1`. The resulting unresolved state aborts the upgrade
+    calculation (`DistUpgradeCache.py:861`).
  
  5. The `BaseMetaPkgs` loop does not catch `SystemError`, so the exception
-    escapes `distUpgrade()` and `self.upgrade(True)` is never reached.
+    escapes `distUpgrade()` and `self.upgrade(True)` is never reached.
  
  [ Why Servers Are Unaffected ]
  
  The server path skips `_installMetaPkgs()`; the desktop path runs it after the
  pre-upgrade quirks and before the full upgrade calculation:
  
-   self.pre_upgrade_rule()
-   self._keepBaseMetaPkgsInstalled(view)
-   if not serverMode:
-       self._installMetaPkgs(view)
-   self.upgrade(True)
+   self.pre_upgrade_rule()
+   self._keepBaseMetaPkgsInstalled(view)
+   if not serverMode:
+       self._installMetaPkgs(view)
+   self.upgrade(True)
  
  In addition, the standard `ubuntu-desktop` metapackage does not pull in
  `lintian`. These two facts explain why server upgrades and the standard 
desktop
  CI path are unaffected.
  
  [ Verification ]
  
  - Stock `26.04.27` U-R-U: fails during calculation.
  - `26.04.18` release-pocket upgrader (without the quirk): passes calculation.
  - `26.04.27` with the quirk disabled: passes calculation.
  - `26.04.27` with the quirk disabled and `BaseMetaPkgs` using
-   `mark_install(auto_fix=False)`: completes the full upgrade.
+   `mark_install(auto_fix=False)`: completes the full upgrade.
  
  The successful full run ended on Ubuntu 26.04.1 LTS with `lintian
  2.129.0ubuntu2.2`, `libdistro-info-perl 1.15ubuntu0.1`,
  `libyaml-libyaml-perl 0.904.0+ds-1`, `libfile-libmagic-perl 1.23-2build2`, and
  `perl 5.40.1-7ubuntu0.4`. `dpkg --audit` was empty and `apt-get check` passed.
  
  [ Proposed Fix ]
  
  Do not run the strict resolver while marking the base metapackages for
  installation:
  
-   - self[pkg].mark_install()
-   + self[pkg].mark_install(auto_fix=False)
+   - self[pkg].mark_install()
+   + self[pkg].mark_install(auto_fix=False)
  
  The quirk should also be revisited or removed. If it must remain for older
  archive snapshots, it should not pull the Perl upgrade into the cache before
  the full upgrade set is calculated.
  
  [ Test Plan ]
  
  Reproduce:
  
  1. Create a Noble container, install a desktop set that pulls in `lintian`, 
and
-    restore networking if NetworkManager leaves the container without DNS:
+    restore networking if NetworkManager leaves the container without DNS:
  
-      lxc launch ubuntu:24.04 uru-lintian-quirk
-      lxc exec uru-lintian-quirk -- cloud-init status --wait
-      lxc exec uru-lintian-quirk -- bash -c \
-        'apt-get update -qq && DEBIAN_FRONTEND=noninteractive \
-         apt-get -y install ubuntu-unity-desktop'
-      lxc exec uru-lintian-quirk -- netplan apply
+      lxc launch ubuntu:24.04 uru-lintian-quirk
+      lxc exec uru-lintian-quirk -- cloud-init status --wait
+      lxc exec uru-lintian-quirk -- bash -c \
+        'apt-get update -qq && DEBIAN_FRONTEND=noninteractive \
+         apt-get -y install ubuntu-unity-desktop'
+      lxc exec uru-lintian-quirk -- netplan apply
  
  2. Download and run the affected upgrader in the container:
  
-      lxc exec uru-lintian-quirk -- rm -rf /var/log/dist-upgrade
+      lxc exec uru-lintian-quirk -- rm -rf /var/log/dist-upgrade
  /tmp/resolute /tmp/resolute.tar.gz
  
-      lxc exec uru-lintian-quirk -- curl -4fL -o /tmp/resolute.tar.gz \
-        
http://archive.ubuntu.com/ubuntu/dists/resolute-updates/main/dist-upgrader-all/current/resolute.tar.gz
+      lxc exec uru-lintian-quirk -- curl -4fL -o /tmp/resolute.tar.gz \
+        
http://archive.ubuntu.com/ubuntu/dists/resolute-updates/main/dist-upgrader-all/current/resolute.tar.gz
  
-      lxc exec uru-lintian-quirk -- bash -c \
-        'mkdir -p /tmp/resolute && tar xzf /tmp/resolute.tar.gz -C 
/tmp/resolute \
-           && grep VERSION /tmp/resolute/DistUpgradeVersion.py'
+      lxc exec uru-lintian-quirk -- bash -c \
+        'mkdir -p /tmp/resolute && tar xzf /tmp/resolute.tar.gz -C 
/tmp/resolute \
+           && grep VERSION /tmp/resolute/DistUpgradeVersion.py'
  
-      lxc exec uru-lintian-quirk -- bash -c \
-        'rm -f /var/run/reboot-required*; cd /tmp/resolute && \
-         python3 dist-upgrade.py --mode=desktop \
-           --frontend=DistUpgradeViewNonInteractive'
+      lxc exec uru-lintian-quirk -- bash -c \
+        'rm -f /var/run/reboot-required*; cd /tmp/resolute && \
+         python3 dist-upgrade.py --mode=desktop \
+           --frontend=DistUpgradeViewNonInteractive'
  
  3. Check the upgrade logs for the quirk, resolver failure, and held-back
-    package:
+    package:
  
-      lxc exec uru-lintian-quirk -- bash -c \
-        'grep -iE "Quirk: Marking|Could not calculate|Resolve 
generated|Holding Back lintian" \
-           /var/log/dist-upgrade/main.log /var/log/dist-upgrade/apt.log'
- 
+      lxc exec uru-lintian-quirk -- bash -c \
+        'grep -iE "Quirk: Marking|Could not calculate|Resolve 
generated|Holding Back lintian" \
+           /var/log/dist-upgrade/main.log /var/log/dist-upgrade/apt.log'
  
  [ Workarounds ]
  
  Either remove `lintian` or upgrade `libdistro-info-perl` before starting the
  release upgrade:
  
-   apt-get -y purge lintian
+   apt-get -y purge lintian
  
-   # or
-   apt-get -y install --only-upgrade libdistro-info-perl
+   # or
+   apt-get -y install --only-upgrade libdistro-info-perl
  
  [ References ]
  
  LP: #2150319 - https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-
  upgrader/+bug/2150319

** Description changed:

  [ Impact ]
  
  The Noble-to-Resolute upgrade fails in our CI during calculation on most 
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.'
  
  `lintian` is not installed by default, but `ubuntu-unity-desktop` recommends
  `gdebi`, which in turn recommends `lintian`. This explains why the regression
  appears in some desktop upgrade tests but not in the standard `ubuntu-desktop`
  CI path.
  
  [ Root Cause ]
  
  1. The quirk added for LP: #2150319 marks `libfile-libmagic-perl` for install
     (`DistUpgradeQuirks.py:387`). Although the quirk passes `auto_fix=False`,
     python-apt still marks the package's dependencies recursively.
  
  2. The Resolute version, `libfile-libmagic-perl 1.23-2build2`, depends on
     `perl (>= 5.40.0-6)`. Marking it pulls `perl 5.40.1-7ubuntu0.4` and related
     Perl upgrades into the Noble cache, leaving the cache broken.
  
  3. The cache is already broken when `BaseMetaPkgs` is processed
     (`DistUpgradeCache.py:587`). That loop calls `mark_install()` with its
     default `auto_fix=True` (`DistUpgradeCache.py:832-833`), invoking the 
strict
     resolver over the cache.
  
  4. The resolver encounters a conflict involving `lintian`:
     `libyaml-libyaml-perl 0.904.0+ds-1` breaks the installed `lintian` version,
     so the resolver tries to upgrade `lintian` to `2.129.0ubuntu2.2`. The new
     `lintian` requires `libdistro-info-perl >= 1.15ubuntu0.1~`, but the 
resolver
     holds `lintian` back rather than upgrading `libdistro-info-perl` from
     `1.7ubuntu0.1`. The resulting unresolved state aborts the upgrade
     calculation (`DistUpgradeCache.py:861`).
  
  5. The `BaseMetaPkgs` loop does not catch `SystemError`, so the exception
     escapes `distUpgrade()` and `self.upgrade(True)` is never reached.
  
  [ Why Servers Are Unaffected ]
  
  The server path skips `_installMetaPkgs()`; the desktop path runs it after the
  pre-upgrade quirks and before the full upgrade calculation:
  
    self.pre_upgrade_rule()
    self._keepBaseMetaPkgsInstalled(view)
    if not serverMode:
        self._installMetaPkgs(view)
    self.upgrade(True)
  
  In addition, the standard `ubuntu-desktop` metapackage does not pull in
  `lintian`. These two facts explain why server upgrades and the standard 
desktop
  CI path are unaffected.
  
- [ Verification ]
+ [ Trials ]
  
  - Stock `26.04.27` U-R-U: fails during calculation.
  - `26.04.18` release-pocket upgrader (without the quirk): passes calculation.
  - `26.04.27` with the quirk disabled: passes calculation.
  - `26.04.27` with the quirk disabled and `BaseMetaPkgs` using
    `mark_install(auto_fix=False)`: completes the full upgrade.
  
  The successful full run ended on Ubuntu 26.04.1 LTS with `lintian
  2.129.0ubuntu2.2`, `libdistro-info-perl 1.15ubuntu0.1`,
  `libyaml-libyaml-perl 0.904.0+ds-1`, `libfile-libmagic-perl 1.23-2build2`, and
  `perl 5.40.1-7ubuntu0.4`. `dpkg --audit` was empty and `apt-get check` passed.
  
  [ Proposed Fix ]
  
  Do not run the strict resolver while marking the base metapackages for
  installation:
  
    - self[pkg].mark_install()
    + self[pkg].mark_install(auto_fix=False)
  
  The quirk should also be revisited or removed. If it must remain for older
  archive snapshots, it should not pull the Perl upgrade into the cache before
  the full upgrade set is calculated.
  
  [ Test Plan ]
  
  Reproduce:
  
  1. Create a Noble container, install a desktop set that pulls in `lintian`, 
and
     restore networking if NetworkManager leaves the container without DNS:
  
       lxc launch ubuntu:24.04 uru-lintian-quirk
       lxc exec uru-lintian-quirk -- cloud-init status --wait
       lxc exec uru-lintian-quirk -- bash -c \
         'apt-get update -qq && DEBIAN_FRONTEND=noninteractive \
          apt-get -y install ubuntu-unity-desktop'
       lxc exec uru-lintian-quirk -- netplan apply
  
  2. Download and run the affected upgrader in the container:
  
       lxc exec uru-lintian-quirk -- rm -rf /var/log/dist-upgrade
  /tmp/resolute /tmp/resolute.tar.gz
  
       lxc exec uru-lintian-quirk -- curl -4fL -o /tmp/resolute.tar.gz \
         
http://archive.ubuntu.com/ubuntu/dists/resolute-updates/main/dist-upgrader-all/current/resolute.tar.gz
  
       lxc exec uru-lintian-quirk -- bash -c \
         'mkdir -p /tmp/resolute && tar xzf /tmp/resolute.tar.gz -C 
/tmp/resolute \
            && grep VERSION /tmp/resolute/DistUpgradeVersion.py'
  
       lxc exec uru-lintian-quirk -- bash -c \
         'rm -f /var/run/reboot-required*; cd /tmp/resolute && \
          python3 dist-upgrade.py --mode=desktop \
            --frontend=DistUpgradeViewNonInteractive'
  
  3. Check the upgrade logs for the quirk, resolver failure, and held-back
     package:
  
       lxc exec uru-lintian-quirk -- bash -c \
         'grep -iE "Quirk: Marking|Could not calculate|Resolve 
generated|Holding Back lintian" \
            /var/log/dist-upgrade/main.log /var/log/dist-upgrade/apt.log'
  
  [ Workarounds ]
  
  Either remove `lintian` or upgrade `libdistro-info-perl` before starting the
  release upgrade:
  
    apt-get -y purge lintian
  
    # or
    apt-get -y install --only-upgrade libdistro-info-perl
  
  [ References ]
  
  LP: #2150319 - https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-
  upgrader/+bug/2150319

** Changed in: ubuntu-release-upgrader (Ubuntu)
       Status: New => In Progress

-- 
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:
  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