← Back to issue list

snapcraft.yaml: don't re-use build dir

View original Github issue

Metadata

Project
snapcraft
Number
#1601
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1601 (commit 3418912a2) renamed the snapcraft.yaml build scriptlet directory to apt-build, stopping the clash with the 'build' dir created by the apt part's make startup when building from source.

Resolution: closed resolved

Reason: PR #1601 was approved and merged, landing as commit 3418912a2 'snapcraft.yaml: don't re-use build dir (#1601)'. Per review feedback from sergiusens, the build scriptlet was changed to use apt-build (and the -p prefix) instead of 'build'.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- Creating the snapcraft snap works fine as long as one is using the snap or the deb to build. However, for reasons unknown to me, when running from source, the `make startup` of the `apt` part creates a directory named `build` that clashes with the `build` scriptlet that also tries to create a directory named `build`. I'm still not sure why this only happens when building from source, but an easy fix is to simply create a different directory in the `build` scriptlet.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1601 (commit 3418912a2) renamed the snapcraft.yaml build scriptlet directory to apt-build, stopping the clash with the 'build' dir created by the apt part's make startup when building from source.
stealth/space-bunny-alpha — closed resolved Merged PR #1601 renamed the build scriptlet directory to apt-build, preventing a source-build clash with apt's startup-generated build directory.
qwen/qwen3.6-35b-a3b — — Merged a fix for a source-build directory clash in snapcraft.yaml. The build directory was renamed to apt-build to avoid scriptlet conflicts. Approved by reviewers and passed CI, resolving the failure.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for a snapcraft.yaml directory conflict. Building from source caused the apt part to create a build directory that clashed with a build scriptlet. The change renames the scriptlet directory to apt-build to resolve the collision.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2283 snapcraft snap: refactor override-build into a script snapcraft merged PR #2283 merged as commit f9592939a, moving the Snapcraft snap's override-build logic into a script to reduce snapcraft.yaml duplication ahead of self-vendoring.
74%