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)
Nov 20 2024, 6:27 AM
Unknown Object (File)
Nov 20 2024, 6:17 AM
Unknown Object (File)
Nov 20 2024, 4:59 AM
Unknown Object (File)
Nov 12 2024, 3:11 AM
Unknown Object (File)
Nov 12 2024, 2:02 AM
Unknown Object (File)
Nov 4 2024, 7:59 PM
Unknown Object (File)
Oct 21 2024, 4:44 AM
Unknown Object (File)
Oct 21 2024, 1:57 AM

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.