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
Unknown Object (File)
Wed, Jul 15, 2:04 AM
Unknown Object (File)
Tue, Jul 14, 5:34 PM
Unknown Object (File)
Sun, Jul 12, 9:12 PM
Unknown Object (File)
Sun, Jul 5, 5:13 AM
Unknown Object (File)
Fri, Jul 3, 1:28 AM
Unknown Object (File)
Thu, Jul 2, 8:25 PM
Unknown Object (File)
Tue, Jun 23, 1:23 PM
Unknown Object (File)
Jun 7 2026, 1:41 PM
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.