Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multi-arch builds in destructive mode #4356

Closed
mr-cal opened this issue Sep 7, 2023 · 1 comment · Fixed by #4839
Closed

Handle multi-arch builds in destructive mode #4356

mr-cal opened this issue Sep 7, 2023 · 1 comment · Fixed by #4839
Labels
enhancement New features or optimizations

Comments

@mr-cal
Copy link
Collaborator

mr-cal commented Sep 7, 2023

What needs to get done

When running in destructive mode, snapcraft should do one of the following:

This issue is referenced in the documentation and should be updated when completed. (both readthedocs and snapcraft.io/docs)

option 1

organize craft-parts directories by architecture:

my-snap-project
├─ amd64
│  ├── parts
│  ├── prime
│  └── stage
└─ arm64
   ├── parts
   ├── prime
   └── stage

option 2

store the architecture in the craft-parts state file and clean between builds of different architectures

Why it needs to get done

Consider the snapcraft.yaml snippet:

base: core22
architectures:
  - build-on: amd64
    build-for: amd64
  - build-on: amd64
    build-for: arm64

When snapcraft --destructive-mode is executed, it will build for amd64 and then for arm64.
On the build for arm64, all steps will be skipped. There is no isolation between the builds.

This is not a problem for core20 snaps.

@mr-cal mr-cal added the enhancement New features or optimizations label Sep 7, 2023
@mr-cal
Copy link
Collaborator Author

mr-cal commented Jun 4, 2024

Update: We are allowing this behavior in core22 but raising a warning message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or optimizations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant