canonical / snapcraft

Package, distribute, and update any app for Linux and IoT.
https://snapcraft.io
GNU General Public License v3.0
1.18k stars 440 forks source link

remote build: error if multiple artefacts can be built on the same architecture #4995

Closed mr-cal closed 2 weeks ago

mr-cal commented 3 weeks ago

What needs to get done

Check if the build plan will create multiple artefacts on any particular architecture. If it will, then raise an error before sending the project to Launchpad.

Why it needs to get done

Launchpad cannot build multiple artefacts on the same architecture. It prepares a build environment and runs Snapcraft in destructive mode without specifying --build-for or --platform. Snapcraft will refuse to run if multiple builds aretfacts can be built.

This is a poor UX because it occurs after the project is uploaded to Launchpad and requires the user to read the logfile downloaded from Launchpad.

The following fails in Launchpad:

platforms:
  amd64:
    build-on: amd64
    build-for: amd64
  platform2:
    build-on: amd64
    build-for: riscv64
syncronize-issues-to-jira[bot] commented 3 weeks ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3279.

This message was autogenerated