Skip to content
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

build: sort.py: add and require -i to edit in-place #6290

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Mar 24, 2024

Similarly to sed -i and perl -i.

This allows checking if sort.py correctly sorts the relevant lines in a
profile without having to overwrite it, which makes debugging and
testing easier (for example, in #6261).

Note: If it finds items that are not sorted, it still sorts them, prints
the diff and returns an error.

@kmk3 kmk3 requested a review from rusty-snake March 24, 2024 07:27
Similarly to `sed -i` and `perl -i`.

This allows checking if sort.py correctly sorts the relevant lines in a
profile without having to overwrite it, which makes debugging and
testing easier (for example, in netblue30#6261).

Note: If it finds items that are not sorted, it still sorts them, prints
the diff and returns an error.
@kmk3 kmk3 merged commit aa08aa1 into netblue30:master Mar 25, 2024
5 checks passed
@kmk3 kmk3 deleted the build-sort-py-i branch March 25, 2024 08:52
kmk3 added a commit that referenced this pull request Mar 25, 2024
kmk3 added a commit to kmk3/firejail that referenced this pull request May 13, 2024
Overwrite in-place by default (`-i`) and add `-n` to override it.

This restores the previous default behavior (from 0.9.72), for the sake
of being consistent with all previous versions and because it's more
likely to be the desired behavior in most cases.

This amends commit aa08aa1 ("build: sort.py: add and require -i to
edit in-place (netblue30#6290)", 2024-03-25).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

3 participants