snapcraft download debian package from incorrect arch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I am using snapcraft 7.3.1 revision 8931 to build a gadget snap on a focal vagrant environment, and here is the snapcraft.yaml
"""
name: test-gadget
base: core22
version: 22-0.1
summary: test
description: |
test only
type: gadget
architectures:
- build-on: amd64
build-for: arm64
confinement: strict
grade: stable
package-
- type: apt
architectures: [ arm64 ]
components: [ main ]
suites: [ jammy, jammy-security, jammy-updates, jammy-backports ]
key-id: F6ECB3762474EDA
url: http://
parts:
prepare-
plugin: nil
stage-packages:
- bsdmainutils:arm64
stage:
- usr/bin/hexdump
"""
After the snap is built successfully, it turns out that the bsdmainutils downloaded is actually from amd64 instead of arm64.
I have done some investigation and come up with two potential solution
1. the python-apt somehow return a amd64 package name in "get_providing_
2. maybe check the arch in the "mark_packages()" in "craft_
Please let me know if you need any further info from me, any suggestions for how to fix is very welcome, and I am happy to try to provide fix with PR as well if there is a plan on how to fix