Snapcraft dpkg-query error on multiarch OS

Bug #1698888 reported by Paul Cercueil
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
Triaged
Medium
Unassigned

Bug Description

When building on a OS with multiarch enabled, and with the i686 and x86_64 versions of libc6 installed, Snapcraft will issue the following error:

dpkg-query: error: --listfiles needs a valid package name but 'libc6' is not: ambiguous package name 'libc6' with more than one installed instance

Use --help for help about querying packages.
Command '['dpkg', '-L', 'libc6']' returned non-zero exit status 2

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Thank you for this! Snapcraft should use a specific arch.

Changed in snapcraft:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Heikki Orsila (heikki-orsila) wrote :

This bug affects me as well. I was able to build a snap package with snapcraft for amd64 with the following hack:

1. mkdir dpkg-wrapper
2. create dpkg-wrapper/dpkg script:
#!/bin/bash

if [[ $1 = "-L" && $2 = "libc6" && $3 = "" ]] ; then
 exec /usr/bin/dpkg -L libc6:amd64
else
 exec /usr/bin/dpkg "$@"
fi

3. export PATH=$(pwd)/dpkg-wrapper:"${PATH}"
4. snapcraft ...

This hack is absolutely terrible, but it worked for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.