Bug 244218 - mergemaster: audit the code to make sure -U still work without RCS ID
Summary: mergemaster: audit the code to make sure -U still work without RCS ID
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-18 21:00 UTC by Xin LI
Modified: 2020-02-19 07:19 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer 2020-02-18 21:00:38 UTC
We would like to make sure that mergemaster won't be affected when RCS ID is removed.
Comment 1 Xin LI freebsd_committer 2020-02-19 07:19:44 UTC
My conclusion is that $FreeBSD$ ID doesn't really matter for mergemaster.

For -U, the code basically sets AUTO_UPGRADE, which causes mergemaster to install new file if it's not user-modified (by comparing the current etc/ tree against saved mtree file).  It works regardless if $FreeBSD$ is present.

For -F, the code does a comparison with diff -q -I '[$]FreeBSD.*[$]' and installs new version if the file only differs in $FreeBSD$ tag.  If we stop expanding $FreeBSD$ or have it removed, the code would fall back to the traditional way of compare and when -U is present, it would correctly handle non-modified configuration files as usual.