← Back to issue list

git describe in an override-build is always claiming to be dirty

View original Github issue

Metadata

Project
craft-application
Number
#942
Type
issue
State
closed
Author
lengau
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Resolved by updating craft-application's lifecycle service to correctly handle spread file ignore patterns, preventing false dirty status in override-builds.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Fixed in craft-application by updating lifecycle.py to correctly ignore spread files, resolving the false dirty state reported by git describe in override-builds.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5831 `git describe` in an `override-build` is always claiming to be dirty snapcraft open Bug where git describe --dirty in an override-build always reports the repo as dirty because spread.yaml and spread/.extension are not copied into the build directory, causing Charmcraft 4.0.0 to appear dirty. Triaged and synced to internal ticket SNAPCRAFT-1251.
78%