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

cksum: permit repeated flags, handle overrides correctly, implement base64 output #6041

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

BenWiederhake
Copy link
Collaborator

This PR changes and tests three things:

  • Accept --tag and --untagged in any order, use the last occurrence.
  • Accept repetitions of everything, flags and arguments like --algorithm.
  • Accept and correctly handle --base64 flag.

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.

Note that cksum is still woefully incomplete; most prominently, the -c option is missing.

src/uu/cksum/src/cksum.rs Outdated Show resolved Hide resolved
@BenWiederhake BenWiederhake force-pushed the dev-cksum-repeat-and-flags branch from 6c39855 to 8f625b6 Compare March 2, 2024 11:30
@BenWiederhake
Copy link
Collaborator Author

Changes since last push:

  • Removed commented-out test code. Thanks @sylvestre for spotting it!
  • Double-checked all the other commits
  • Rebased on current main

@BenWiederhake
Copy link
Collaborator Author

Only now I see that a similar, but older PR from @tertsdiepraam exists: #5122
I'm not sure what's a good way forward.

@tertsdiepraam
Copy link
Member

Yours can take priority. I haven't looked at mine in a while and I can always rebase it.

@sylvestre sylvestre force-pushed the dev-cksum-repeat-and-flags branch from 8f625b6 to 01a64d1 Compare March 9, 2024 21:53
Copy link

GNU testsuite comparison:

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

@BenWiederhake BenWiederhake force-pushed the dev-cksum-repeat-and-flags branch from 01a64d1 to 133cdde Compare March 18, 2024 20:03
@BenWiederhake
Copy link
Collaborator Author

Changes since last push: Just rebased, to demonstrate that it's still working.

Is there anything missing?

Copy link
Contributor

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it is great, just busy. I will accept it once the CI is green

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre merged commit 6f95d05 into uutils:main Mar 18, 2024
61 of 62 checks passed
@BenWiederhake BenWiederhake deleted the dev-cksum-repeat-and-flags branch March 18, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants