This project is archived. Its data is read-only. This project is read-only.
bst --track modifies bst files even when their source refs are unchanged
## Summary After discussion, it has been identified that: * ruamel.yaml is imperfect, when we rewrite a file, some indentation will be changed and whitespace will change in some places * it's still not horrible, comments and order is properly preserved, and whitespace is preserved in most cases, but it could be better * After introducing the `project.refs` feature (in commits referred to in the discussion below), it seems that we are rewriting the element `.bst` files at `bst track` time even when the ref has not changed. ## Steps to reproduce - `bst --track` an element with custom indentation - git diff the file, and see indentation changes ## What is the current bug behavior? When running bst-track, indentation, ordering and comments are not preserved. ## What is the expected correct behavior? bst track should update the version/sha, but respect the files formatting. ## Relevant logs and/or screenshots https://gitlab.com/freedesktop-sdk/freedesktop-sdk/merge_requests/318/diffs ## Example element ``` YAML kind: manual description: Build curl # Comment comment pls remember depends: - base.bst # ruamel isn't quite working sources: - kind: git url: https://github.com/curl/curl.git config: build-commands: - ./buildconf - ./configure - make ``` After bst track <file>: ``` YAML config: build-commands: - ./buildconf - ./configure - make depends: - base.bst description: Build curl kind: manual sources: - kind: git ref: url: https://github.com/curl/curl.git ``` ## Possible fixes review changes in 19cad981 as this is where the regression appears to have been caused. ## BuildStream version affected: bst version: 1.1.3+4.g0916d81e
issue