Page MenuHomeFreeBSD

ar: accept but ignore 'T' option
ClosedPublic

Authored by emaste on Dec 18 2021, 7:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 4 2024, 1:02 PM
Unknown Object (File)
Feb 14 2024, 4:52 AM
Unknown Object (File)
Jan 12 2024, 1:36 AM
Unknown Object (File)
Jan 10 2024, 4:01 PM
Unknown Object (File)
Dec 20 2023, 1:05 AM
Unknown Object (File)
Dec 12 2023, 7:14 PM
Unknown Object (File)
Nov 24 2023, 10:27 PM
Unknown Object (File)
Nov 24 2023, 10:27 PM

Details

Summary
ar: accept but ignore 'T' option

In previous versions of BSD ar -T was an alias for -f -- use only the
first 15 characters of archive member names.  In GNU ar and LLVM ar -T
creates a thin archive.

The -f / old BSD ar -T functionality is not particularly useful, and
ignoring -T still results in a usable and compatible (but not thin)
archive.

PR:             260523 [exp-run]
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D33553

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.
usr.bin/ar/ar.c
233

Maybe this could start out as warnx("-T option truncates member names rather than creating thin archives"); until it is addressed in ports (see PR260523)

And the man page could start as

.It Fl T
Deprecated alias for
.Fl f .
In other implementations of
.Nm
.Fl T
creates a "thin" archive.
emaste retitled this revision from ar: remove `-T` option to ar: accept but ignore 'T' option.
emaste edited the summary of this revision. (Show Details)

Change plans: accept but ignore -T.

I intend to MFC edadbb46065d9ee9559140b2522197fcdba57064 to stable/13 and stable/12, so that they will emit a warning and treat -T as -f.

markj added inline comments.
usr.bin/ar/ar.c
233

Seems reasonable to me. Given that there's an existing alternative (-f) and that an exp-run didn't turn up any issues (though, it wouldn't tell you how often this flag is actually used) I don't think it matters too much.

This revision is now accepted and ready to land.Jan 3 2022, 3:57 PM
This revision was automatically updated to reflect the committed changes.