snap: improve early base detection logic
Metadata
Current evaluation
Merged PR #2309 (commit 3565ed2e7), fixing early base detection when Snapcraft runs in a build provider outside the project directory (LP #1795501).
Resolution: closed resolved
Reason: PR canonical/snapcraft#2309 was approved and merged as commit 3565ed2e7. It fixed detection for build providers, where Snapcraft does not run in the project directory by default.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The current logic missed the detection when running inside
a build provider given that by default snapcraft does not
run within the project directory.
LP: #1795501
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] 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)?
- [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2309 (commit 3565ed2e7), fixing early base detection when Snapcraft runs in a build provider outside the project directory (LP #1795501). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR canonical/snapcraft#2309 fixed early base detection in build providers by accounting for Snapcraft running outside the project directory (LP #1795501). | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for early base detection logic that previously failed when running inside a build provider due to snapcraft not executing in the project directory. Resolves LP: #1795501. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5388 fix: don't fail when checking the base | snapcraft | merged | Merged PR #5388 in commit 5c43d861c, deferring base-check failures so invalid base definitions reach Snapcraft's user-friendly validation errors (SNAPCRAFT-313). | |
| #6193 fix: snapcraft try error shows effective base | snapcraft | merged | Merged PR #6193 fixed `snapcraft try` to report the project's effective base via `get_effective_base()`, with core24 and core26 test coverage, in commit bcae1c3ed. | |
| #3579 snap: move base to core20 (CRAFT-509) | snapcraft | merged | Merged PR #3579 via ed2baf8bd, moving Snapcraft's own snap to the core20 base; implementation commit 18a974e01. | |
| #3014 meta: migrate get_build_base to Snap | snapcraft | merged | Merged in snapcraft#3014 via commit 09be6bb53, moving get_build_base from Projectinfo to Snap and simplifying tests to use Snap metadata instead of self.project.info. | |
| #6187 Fix snapcraft try error to show actual base | snapcraft | closed | Closed unmerged over contribution-guideline concerns; PR #6193 later fixed #6186 by using the effective project base in commit bcae1c3ed. | |
| #4755 tests: fix devel base snap test | snapcraft | merged | Merged #4755, fixing the devel-base integration test to verify Snapcraft can create the base snap and that the resulting devel base is usable. | |
| #4580 fix: do not propagate build-base to snap.yaml | snapcraft | merged | Merged #4580 (d4e948f33), preventing build-base from being propagated into generated snap.yaml files. | |
| #1795501 Better base detection | snapcraft (launchpad) | closed | Build-environment base detection was fixed by merged PR #2309 (commit 3565ed2e7); PR #2311 also corrected legacy re-exec behavior. | |
| #1660696 Snapcraft is testing file collisions on unbuilt parts | snapcraft (launchpad) | closed | Collision detection ran on not-yet-built parts, causing file-not-found failures (dump plugin with custom build). Fixed by PR #1405 (commit dbdc4b5a6), merged into snapcraft; bug was acknowledged by maintainers. | |
| #6499 fix: parse build-base for snapcraftctl validation | snapcraft | merged | Fixed a validator bug preventing core22/core24 snaps without a `base` key from using `snapcraftctl`. Merged as #6499, resolving #6336. |