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
F115873067: D43443.diff
Tue, Apr 29, 8:39 PM
Unknown Object (File)
Sat, Apr 5, 10:23 PM
Unknown Object (File)
Mar 10 2025, 6:17 AM
Unknown Object (File)
Mar 10 2025, 12:24 AM
Unknown Object (File)
Jan 9 2025, 3:59 AM
Unknown Object (File)
Oct 7 2024, 3:41 AM
Unknown Object (File)
Oct 5 2024, 8:41 PM
Unknown Object (File)
Oct 3 2024, 6:23 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.