git describe in an override-build is always claiming to be dirty
Metadata
Current evaluation
Fixed in canonical/craft-application#1013 (f4a4d282): override builds now pull local Spread test files while ignoring outdated changes, preventing false dirty Git metadata.
Resolution: closed resolved
Reason: PR #1013 was merged and implemented the fix in commit f4a4d282 by separating local test-file pulling from outdated-source handling.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
This is upstreamed from https://github.com/canonical/snapcraft/issues/5831
If you have a `spread/.extension` file, `git describe --dirty` in an override-build will always show the repo as dirty because `spread.yaml` and `spread/.extension` don't get copied into the build directory.
This is causing Charmcraft 4.0.0 to appear to be dirty.
### To Reproduce
Check out the 4.0.0 tag of Charmcraft and pack it
### Environment
My machine, launchpad, etc...
### snapcraft.yaml
```yaml
...
```
### Relevant log output
```shell
n/a
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/craft-application#1013 (f4a4d282): override builds now pull local Spread test files while ignoring outdated changes, preventing false dirty Git metadata. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by craft-application#1013 (commit f4a4d282): override-builds now pull local spread test files while ignoring outdated changes, preventing false dirty git metadata. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by updating craft-application's lifecycle service to correctly handle spread file ignore patterns, preventing false dirty status in override-builds. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by updating craft_application/services/lifecycle.py to adjust source ignore patterns for spread files. This ensures they are correctly managed during override-builds, preventing git describe from falsely reporting the repository as dirty. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved in craft-application by modifying lifecycle.py to properly apply ignore patterns for spread files, preventing git describe from falsely reporting a dirty state during override-builds. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by updating craft-application's lifecycle service to properly configure spread file ignore patterns. This prevents git describe from falsely reporting the repository as dirty during override-builds when spread files are excluded. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-application#1013
(confidence 100%)
Merged fix for lifecycle handling of local Spread test files.
-
Caused By:
canonical/craft-application#766
(confidence 95%)
The maintainer identified this change as the likely source of the regression.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5831 `git describe` in an `override-build` is always claiming to be dirty | snapcraft | open | Git repo always reported dirty during override-build because spread.yaml and spread/ were not copied into the part build dir. Fixed upstream in craft-application, shipped to Snapcraft 8.14.1 via the 6.2.0 dependency bump. |