← Back to issue list

libdevmapper-dev fails to install as build-package using snapcraft:core20 (Multipass)

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1982420
Type
issue
State
open
Author
~nuccitheboss
Labels
Created
Updated
Closed

Current evaluation

core20 snap build in Multipass fails installing libdevmapper-dev build-package because the build instance apt upgrade pulls from focal-backports, then sources revert to main, leaving unmet version dependencies. No maintainer activity in ~3.5 years.

Suggested action: close stale

Reason: The issue is 1503 days old with zero comments and no maintainer interaction, reported against snapcraft 7.0.11 and core20 (focal), which is now EOL and no longer a supported base. The reporter also documented a working workaround (use LXD or add focal-backports as a package repository in snapcraft.yaml), and the root cause is an apt source discrepancy in the deprecated core20 Multipass image rather than a current snapcraft code path. Inactivity alone is not the reason; the affected base version is no longer supported.

Impact: 30 Quick Win: 12.0 Staleness: 95 Complexity: 60 Confidence: 55 Support Request: 10

Issue body

# Description When trying to install the package `libdevmapper-dev` as a build-package in a core20 based snap, the package fails due to a discrepancy in the apt sources between updating the multipass build instance and installing the build packages specified in the `snapcraft.yaml` file. # Snapcraft, Multipass, and Ubuntu versions $ snapcraft version snapcraft 7.0.11 $ multipass version multipass 1.10.1 multipassd 1.10.1 # Stacktrace and what I expect to happen ``` Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libdevmapper-dev : Depends: libdevmapper1.02.1 (= 2:1.02.167-1ubuntu1) but 2:1.02.175-2ubuntu4~ubuntu20.04.1 is to be installed E: Unable to correct problems, you have held broken packages. ``` I expect libdevmapper-dev to install correctly because I already have libdevmapper1.02.1 installed inside the multipass instance. # Steps to reproduce Currently, I am trying to build the microstack snap to troubleshoot some confinement issues (not related to this issue). Here are the commands that I am using to try and build the package: 1. sudo snap install multipass --classic 2. sudo snap install snapcraft --classic 3. git clone https://opendev.org/x/microstack.git 4. cd microstack 5. snapcraft # Preliminary investigation Browsing two separate environments, I noticed there is a discrepancy between the apt-cache policy for the libdevmapper-dev package between the unmodified snapcraft:core20 image and the failed build instance. *Policy for base instance* ``` $ apt-cache policy libdevmapper-dev libdevmapper-dev: Installed: (none) Candidate: 2:1.02.167-1ubuntu1 Version table: 2:1.02.175-2ubuntu4~ubuntu20.04.1 100 100 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages 2:1.02.167-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages ``` *Policy for failed build instance* ``` $ apt-cache policy libdevmapper-dev libdevmapper-dev: Installed: (none) Candidate: 2:1.02.167-1ubuntu1 Version table: 2:1.02.167-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages ``` Looking at these policies, it seems that when the build instance is upgrading, before pulling in the build-dependencies, apt is pulling packages from both the main and focal-backports pockets. Once the upgrade finishes, the apt sources update so that apt will only pull from the main pocket. However, since libdevmapper-dev is not compatible with the libdevmapper1.02.1 pulled from focal-backports pocket, libdevmapper-dev fails to install. I found the apt sources being changed when parsing output from journalctl. # Potential impact and mitigation Any snap package using core20 as its base that requires `libdevmapper-dev` will fail to build if using multipass as the build provider. This bug might also affect other packages that are tied to a specific version of a package modified when the multipass instance is upgraded. To get around this issue for now, any package that requires `libdevmapper-dev` as a build dependency should use LXD as the build provider. 1. sudo snap install lxd 2. lxd init --auto 3. snapcraft --use-lxd You can also add focal-backports as a package repository in the `snapcraft.yaml` file: https://snapcraft.io/docs/package-repositories # Potential solution Either enable snapcraft to use the focal-backports pocket in multipass-backed builds, or disable the focal-backports pocket in the snapcraft:core20 multipass image so that apt does not pull from there when upgrading the instance. # Attachments * Log file for the snap package build * journalctl | grep ".sources" output

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 12.0
Staleness: 95
Complexity: 60
Confidence: 55
Support Request: 10
close stale core20 snap build in Multipass fails installing libdevmapper-dev build-package because the build instance apt upgrade pulls from focal-backports, then sources revert to main, leaving unmet version dependencies. No maintainer activity in ~3.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 55
Confidence: 85
Support Request: 10
close stale Build failure when installing libdevmapper-dev in core20 Multipass builds due to apt version mismatch between focal and focal-backports. Inactive for over 3 years with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 15
close stale Build failure for libdevmapper-dev in core20 multipass builds due to apt source version conflicts. Unlabelled, inactive for over 3 years, with author-provided LXD workaround.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 20
close stale Build failure for libdevmapper-dev on core20/Multipass due to apt source version mismatch during instance upgrade. Unresolved for over 4 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 10
close stale Build fails when installing libdevmapper-dev in core20 multipass instances due to apt version mismatch from focal-backports. Untriaged and inactive for over 3 years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.