Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chcon: Handle repeated flags and overrides between --no-XXX and --XXX #6039

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

BenWiederhake
Copy link
Collaborator

This PR changes and tests three things:

  • Accept --no-dereference and --dereference in any order, use the last occurrence.
  • Accept --no-preserve-root and --preserve-root in any order, use the last occurrence.
  • Accept repetitions of everything, flags and arguments like --user.

All three of these are GNU behavior bugs, i.e. GNU does it differently, and uutils wants to handle it like GNU does.

This is work towards #5998.

@BenWiederhake
Copy link
Collaborator Author

Changes since last push:

  • Mark "vvRRHHLLPP" as a non-typo. The spellchecker is very noisy, is it really worth it?
  • Nothing else.

@tertsdiepraam
Copy link
Member

Mark "vvRRHHLLPP" as a non-typo. The spellchecker is very noisy, is it really worth it?

It saves us a bunch of review time and helps with consistency across the project. Installing it locally helps a lot, because then you can just see the spelling errors before committing.

@BenWiederhake
Copy link
Collaborator Author

I did install it locally, and it already saved me a CI cycle, but it doesn't currently run automatically on each commit. Would a PR to add it to pre-commit be welcome? (Of course, not everyone has it installed, the script / invocation would have to deal with that.)

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Mar 2, 2024

Let's open an issue for doing CI checks locally. I'm not really sold on mandatory pre-commit hooks, but I'd love to have a Justfile or something like that to do all the checks (spelling, fmt, clippy, cargo check, cargo deny) locally before pushing.

I might even try doing that with nix or something, so that all the tools are installed automatically. We have lots of options.

@sylvestre sylvestre force-pushed the dev-chcon-repeat-args branch from db195a7 to 8be5f7a Compare March 9, 2024 21:52
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/chown/preserve-root is no longer failing!

@sylvestre sylvestre merged commit 2e8f0e5 into uutils:main Mar 10, 2024
62 checks passed
@BenWiederhake BenWiederhake deleted the dev-chcon-repeat-args branch March 11, 2024 01:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants