Skip to content

Meta: Fix uutils coreutils du detection#26120

Merged
spholz merged 1 commit into
SerenityOS:masterfrom
StarterX4:fix-du-uutils-detect
Aug 13, 2025
Merged

Meta: Fix uutils coreutils du detection#26120
spholz merged 1 commit into
SerenityOS:masterfrom
StarterX4:fix-du-uutils-detect

Conversation

@StarterX4

Copy link
Copy Markdown
Contributor

As uutils coreutils (a Rust GNU coreutils reimplementation) du --help doesn't include any information where it comes from, but du -V does:

[starterx4@doadgrz ~]$ du -V
du (uutils coreutils) 0.1.0

We have to use it then to detect uutils correctly as the BSD -A argument fails (uutils is not BSD-compatible):

error: unexpected argument '-A' found

  tip: to pass '-A' as a value, use '-- -A'

Usage: du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F
error: unexpected argument '-A' found

  tip: to pass '-A' as a value, use '-- -A'

Usage: du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F

@github-actions github-actions Bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Aug 10, 2025
@BuggieBot

Copy link
Copy Markdown
Member

Hello!

One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@spholz

spholz commented Aug 10, 2025

Copy link
Copy Markdown
Member

Please configure your editor to not use Windows line endings (only LF instead of CRLF) for the commit message.
And word-wrap the lines of the commit message after 72 characters.

As uutils coreutils (a Rust GNU coreutils reimplementation)
`du --help` doesn't include any information where it comes from,
but `du -V` does:
```
[starterx4@doadgrz ~]$ du -V
du (uutils coreutils) 0.1.0
```

We have to use it then to detect uutils correctly as
the BSD `-A` argument fails (uutils is not BSD-compatible):
```
error: unexpected argument '-A' found

  tip: to pass '-A' as a value, use '-- -A'

Usage: du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F
error: unexpected argument '-A' found

  tip: to pass '-A' as a value, use '-- -A'

Usage: du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F
```

Also we have to use `--apparent-size`
due to a bug with `-b` (SerenityOS#26121)
@StarterX4
StarterX4 force-pushed the fix-du-uutils-detect branch from a515ed3 to f4f7e18 Compare August 12, 2025 10:29
@spholz spholz added ✅ pr-maintainer-approved-but-awaiting-ci PR has been approved by a maintainer and can be merged after CI has passed and removed 👀 pr-needs-review PR needs review from a maintainer or community member labels Aug 12, 2025
@spholz
spholz merged commit c166a64 into SerenityOS:master Aug 13, 2025
20 of 21 checks passed
@github-actions github-actions Bot removed the ✅ pr-maintainer-approved-but-awaiting-ci PR has been approved by a maintainer and can be merged after CI has passed label Aug 13, 2025
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.

3 participants