-
Notifications
You must be signed in to change notification settings - Fork 77
repositories: convert from JSON to YAML #2119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
A previous version of this PR changed the images API or behaviour causing integration issues with osbuild-composer. |
6133ae0 to
a2a547c
Compare
|
Needs conflict resolving and since #2114 landed those probably also want conversion? :) |
A simple script to reformat the repository YAML files for consistency and better editing experience. The script ensures: - Consistent formatting - Multi-line YAML format for gpgkey/gpgkeys fields (for easy pasting) - Proper field ordering The script is used in the prepare-source.sh script to reformat the repository YAML files before committing them.
Switch from JSON to YAML for embedded repository files.
|
Sure, done. |
supakeen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'm OK with this. Let's see if others feel strongly about keeping it YAML (perhaps backports are annoying?).
|
I would personally prefer not to do this, but can be convinced otherwise if everyone else is in favour. The downsides of keeping them in json, as far as I can tell are:
I agree with 1, but 2 was never a problem for these files. Now, the downsides of having them in yaml are:
I don't think it's worth it. We're rarely, if ever, modifying these by hand and constantly reading and modifying them in scripts. I agree that the GPG keys can get annoying to copy and paste in json but it's not frequent enough nor really that difficult to do to warrant this kind of change. |
The benefit is mostly to users that can more easily copy these files and edit them. It might be small :) |
I do agree there's value there, especially with the image definition config drop-ins etc. And going back to the discussion of having repo definitions as part of the distro definitions instead of living separately is still worth doing. But that's a bigger topic that requires more careful consideration (backwards compatibility with existing documentation, the way distro versions are defined by repos, how things work in brew, osbuild-composer, etc). I think we need to consider these, but this quick format change to me is a distraction that doesn't really take into account any other future plans. |
|
With nobody coming in with support for this, I am closing this for good. |
Converts repos from JSON to YAML, I used Python to do the job and then I created a formatting script that modifies the generated YAML because it was totally unusable (keys order, quoting, GPG keys not multi-line).
There are no changes made except I took the liberty to remove empty lists (e.g.
gpgkeys: []) I quickly scanned the codebase and it should not be a problem. It looks nicer this way.Edit: I dropped the conversion script which I initially included. Shutzbot update PR linked to this PR.