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)
Tue, Nov 12, 3:11 AM
Unknown Object (File)
Tue, Nov 12, 2:02 AM
Unknown Object (File)
Mon, Nov 4, 7:59 PM
Unknown Object (File)
Mon, Oct 21, 4:44 AM
Unknown Object (File)
Oct 21 2024, 1:57 AM
Unknown Object (File)
Oct 20 2024, 3:06 AM
Unknown Object (File)
Oct 19 2024, 11:14 PM
Unknown Object (File)
Oct 18 2024, 8:54 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

Lint
Lint Skipped
Unit
Tests Skipped

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.