Page MenuHomeFreeBSD

build: Use ls -i | cut rather than stat -f %i to extract inode
ClosedPublic

Authored by imp on Jan 12 2024, 11:44 PM.
Tags
None
Referenced Files
F84114388: D43443.diff
Sun, May 19, 2:46 PM
Unknown Object (File)
Sat, Apr 27, 11:43 AM
Unknown Object (File)
Sat, Apr 27, 11:39 AM
Unknown Object (File)
Sat, Apr 27, 9:37 AM
Unknown Object (File)
Mar 30 2024, 9:05 PM
Unknown Object (File)
Mar 21 2024, 3:44 AM
Unknown Object (File)
Mar 11 2024, 9:26 PM
Unknown Object (File)
Feb 13 2024, 4:51 AM
Subscribers

Details

Summary

ls -i dates back to 5th edition Unix and is more portable than the stat
command, though %% is a newer shellism, it works on any shell that
FreeBSD builds with.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 55418
Build 52307: arc lint + arc unit

Event Timeline

imp requested review of this revision.Jan 12 2024, 11:44 PM

Both of these features are required by POSIX, %% also seems to be required:
https://pubs.opengroup.org/onlinepubs/009604499/utilities/xcu_chap02.html#tag_02_06_02

Does this mean the build no longer requires the stat command?

This revision is now accepted and ready to land.Jan 14 2024, 12:13 AM

Both of these features are required by POSIX, %% also seems to be required:
https://pubs.opengroup.org/onlinepubs/009604499/utilities/xcu_chap02.html#tag_02_06_02

Does this mean the build no longer requires the stat command?

Yes. That's my belief. I did the patch a few months ago.

Landed 1461f1ec3adcc27c5605ac63b5fed94006c66202 w/o git arc stage accidentally.