not reliable way to detect target architecture
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
There is no reliable way to determine target snap architecture or at least project.target_arch does not provide consistent value
tested with snapcraft version 3.0.1
Tested use cases:
native build:
project.
SNAPCRAFT_
cross build with --target-arch:
project.
SNAPCRAFT_
build on amd64 with following statement in snapcraft.yaml
architectures:
- build-on: [amd64, arm64]
run-on: arm64
expected values:
project.
SNAPCRAFT_
actual values:
project.
SNAPCRAFT_
I can reproduce this with snapcraft version 3.4+git7.gba7c6e1
Also, I can't even get the $SNAPCRAFT_ ARCH_TRIPLET to have the target arch when using --target-arch, it is always the host arch for me now when building a snap with a base specified (and hence using multipass).