Page MenuHomeFreeBSD

Fix etcupdate diff with POSIXLY_CORRECT set, add option to list changes files
ClosedPublic

Authored by lytboris_gmail.com on Apr 29 2026, 11:07 AM.
Tags
None
Referenced Files
F168001180: D56708.id176776.diff
Tue, Aug 25, 8:46 PM
F168001029: D56708.id176775.diff
Tue, Aug 25, 8:45 PM
F167888671: D56708.id176892.diff
Tue, Aug 25, 6:45 AM
F167876718: D56708.id.diff
Tue, Aug 25, 4:47 AM
F167852164: D56708.id176776.diff
Tue, Aug 25, 12:31 AM
F167850024: D56708.id176776.diff
Tue, Aug 25, 12:09 AM
F167850017: D56708.id176775.diff
Tue, Aug 25, 12:09 AM
F167849908: D56708.diff
Tue, Aug 25, 12:07 AM
Subscribers

Details

Summary

etcupdate diff fails to show any diffs when POSIXLY_CORRECT environment variable is set. Instead of showing a diff, etcupdate diff emits diff --help for each file that was altered locally. This happens due to misplacement of the second -L argument of diff command, it is treated by getopt_long as an error.

This proposal fixes this behavior simply moving the second -L argument into a proper place.

A new feature comes along with this fix: -l argument for a diff command alters the way it shows differences. Instead of printing full diff, it reports changed file the same way as added/removed files are reported.

Diff Detail

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