Merge ubuntu-release-upgrader:fix-wsl-upgrade into ubuntu-release-upgrader:ubuntu/master

Proposed by Didier Roche-Tolomelli
Status: Merged
Merged at revision: f5e25c214cf34e4a23daa9767ed1d3ee037e07e3
Proposed branch: ubuntu-release-upgrader:fix-wsl-upgrade
Merge into: ubuntu-release-upgrader:ubuntu/master
Diff against target: 15 lines (+3/-1)
1 file modified
DistUpgrade/DistUpgradeQuirks.py (+3/-1)
Reviewer Review Type Date Requested Status
Brian Murray Pending
Review via email: mp+411011@code.launchpad.net

Description of the change

Fix upgrade under WSL

snapd package is installed but not started (no systemd support for now).
Ensure that we only try to connect to snapd if there is a socket for systemd activation or that it’s already running.
This was causing a silent failure.

Fixes https://bugs.launchpad.net/ubuntu/+bug/1926267.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks, I've uploaded this for jammy.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
2index ae23a5d..b8f7eb4 100644
3--- a/DistUpgrade/DistUpgradeQuirks.py
4+++ b/DistUpgrade/DistUpgradeQuirks.py
5@@ -125,7 +125,9 @@ class DistUpgradeQuirks(object):
6 if 'snapd' not in cache:
7 logging.debug("package required for Quirk not in cache")
8 return
9- if cache['snapd'].is_installed:
10+ if cache['snapd'].is_installed and \
11+ (os.path.exists('/run/snapd.socket') or
12+ os.path.exists('/run/snapd-snap.socket')):
13 self._checkStoreConnectivity()
14 # If the snap store is accessible, at the same time calculate the
15 # extra size needed by to-be-installed snaps. This also prepares

Subscribers

People subscribed via source and target branches