snapcraft.yaml: don't re-use build dir
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix renaming the conflicting build directory to apt-build in snapcraft.yaml. This resolves a directory collision during source builds caused by make startup and the build scriptlet. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2256 local source: don't include .snapcraft directory | snapcraft | merged | Resolved LP: #1791773 by merging a change that excludes the .snapcraft directory from copying and part staleness checks. Approved, passed CI, and merged with a six-line update across two files. | |
| #4662 fix(test): do not create 2 snapcraft.yaml and confuse location | snapcraft | merged | Merged a test fix preventing duplicate snapcraft.yaml creation in conflicting root and snap directories. Resolves silent overrides and ensures hooks are detected by clarifying fixture paths. Approved and merged. | |
| #442 executor: fix subdir in pull and build steps | craft-parts | merged | Merged fix aligning pull and build step working directories with source-subdir settings. Approved by two reviewers and passed CI. Reviewers noted potential Snapcraft breakage and recommended noting workaround removal in release notes. | |
| #2283 snapcraft snap: refactor override-build into a script | snapcraft | merged | Merged refactoring that extracts override-build into a standalone script to reduce snapcraft.yaml duplication and support internal vendoring. Approved by reviewer, passed CI, and modified two files. | |
| #1073 project: snapcraft.yaml in a snap directory | snapcraft | merged | Merged into master. Defaults new projects to place snapcraft.yaml inside a snap directory while retaining support for legacy locations. Approved and passed CI checks. | |
| #1575628 Snapcraft doesn't ignore already-built snaps when `source` is the folder containing the `snapcraft.yaml` | snapcraft (launchpad) | closed | Fixed and verified. Snapcraft now correctly excludes already-built .snap files when the source directory contains snapcraft.yaml, preventing unnecessary large copies during builds. | |
| #2309 snap: improve early base detection logic | snapcraft | merged | Merged. Resolved early base detection failure in build providers by updating logic to account for snapcraft's non-project directory execution. Approved by reviewer, passed CI, and merged with minimal changes. | |
| #1497371 snapcraft clean fails on a clean directory | snapcraft (launchpad) | closed | Fixed a FileNotFoundError crash in snapcraft clean when executed on a fresh directory. The command now gracefully handles the absence of the parts directory instead of failing. | |
| #1069 snapcraft.yaml and building in snap directory | snapcraft | closed | Closed without merging. The maintainer reviewed the snapcraft.yaml and build directory changes but opted to close the pull request to de-clutter the repository. | |
| #274 fix: add build-aux location for snapcraft project | fetch-service | merged | Merged to add the build-aux location for the snapcraft project. Approved by two reviewers, the change updates two files with a net addition of five lines. The maintainer merged it from main to resolve an OSV issue. |