2023-05-05 15:25:46 |
Dilyn |
description |
Rnning `snapcraft --use-lxd --build-for=arm64` fails at the package repository update step. Currently (snapcraft rev. 9121) `dpkg` will be used to add a new architecture (when building either in destructive mode or in LXD). For whatever reason, when `apt update` is run the incorrect URL is used for the new architecture (it points to archive.ubuntu.com instead of ports.ubuntu.com).
A simple resolution I've found is making the deb sources in `/etc/apt/sources.list` more explicit by adding `[arch=amd64]` to each line.
Considering `snapcraft` already modifies the image by running updates and adding foreign architectures, it seems reasonable to at least make the repositories the image uses a bit more explicit architecture-wise.
The particular lines in question where I think this happens:
https://github.com/canonical/craft-archives/blob/cc4a9346eee627948d76ade16041f96b4ad70ff1/craft_archives/repo/apt_sources_manager.py#L220-L224 |
Rnning `snapcraft --use-lxd --build-for=arm64` fails at the package repository update step. Currently (snapcraft rev. 9121) `dpkg` will be used to add a new architecture (when building either in destructive mode or in LXD). For whatever reason, when `apt update` is run the incorrect URL is used for the new architecture (it points to archive.ubuntu.com instead of ports.ubuntu.com).
A simple resolution I've found is making the deb sources in `/etc/apt/sources.list` more explicit by adding `[arch=amd64]` to each line.
Considering snapcraft already modifies the image by running updates and adding foreign architectures, it seems reasonable to at least make the repositories the image uses a bit more explicit architecture-wise.
The particular lines in question where I think this happens:
https://github.com/canonical/craft-archives/blob/cc4a9346eee627948d76ade16041f96b4ad70ff1/craft_archives/repo/apt_sources_manager.py#L220-L224 |
|