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
F167528466: D56708.id.diff
Sat, Aug 22, 12:28 PM
F167523503: D56708.diff
Sat, Aug 22, 11:34 AM
Unknown Object (File)
Thu, Aug 20, 12:26 PM
Unknown Object (File)
Wed, Aug 19, 6:35 PM
Unknown Object (File)
Sat, Aug 15, 12:45 PM
Unknown Object (File)
Fri, Aug 14, 6:05 AM
Unknown Object (File)
Thu, Aug 13, 1:08 AM
Unknown Object (File)
Thu, Aug 13, 12:46 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 Skipped
Unit
Tests Skipped