Re: New mergemaster option to install files that differ only by $FreeBSD

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Wed, 25 Mar 2009 14:34:05 -0700
Tim Kientzle wrote:
> Doug Barton wrote:
>> Andreas Tobler wrote:
>>> Hm, then it seems to me that I did something 'wrong' when I co'ed the
>>> svn repository. I am an anonymous user, aka having no svn account.
>>
>> You're not using the devel/subversion-freebsd port.
> 
>> I'm glad you're happy now, but you won't be when you do your next
>> mergemaster run.  :)
>>
>> Mergemaster counts on there being a real version number in the VCS Id
>> string to compare against and learn about new versions of files. If
>> the files in your base and the files in the src tree all have
>> identical strings (i.e., they are all equal to $FreeBSD$) then
>> mergemaster will never know that there is a new version available.
> 
> This sounds like a problem. 

This sounds like the way that mergemaster has worked for 11 years.
That said, mergemaster has the option for doing a "strict" comparison
that ignores the VCS Id already. If this issue becomes widespread
before a better solution arises I can enable that option by default.

> I'm not sure we can
> safely assume that non-committers will be using
> devel/subversion-freebsd.

Then we need to make sure that the server side does the right thing in
that case. (This will be a problem that goes way past a minor
inconvenience for mergemaster if we don't get it right.)

> I've long wondered if there were some way to generically
> checksum every one of these files at install time
> (Maybe adding a final "#md5:XXXXXXXX" line?  Does every
> file in /etc/ support "#" as a comment start?)

Well that definitely won't work, and no, not every file supports that
kind of comment.

However, there is a -U option to mergemaster that works off the
checksum of the unmodified files created in the temproot directory
from your last run that allows you to automatically update the files
in your base that you haven't modified. There is a boot-strapping
problem with new installs that the -F option was designed to help work
around.

If I get the time I will work with re_at_ to see if we can't generate
that mtree database as part of the release build, but I'm not making
any promises.

> Then these checksums could be used to definitively
> determine:
>   * Files that had local edits (checksum mismatch)
>   * Old files that were different from the system being installed
> all without relying on VCS IDs or other conventions.
> In particular, it would be really nice to be able to
> say "just update everything that doesn't have local edits
> and let me manually review the rest."

As I said, the -U option already does that.

I really wish that people who had Bright IdeasTM for mergemaster would
read the man page first.


Doug

-- 

    This .signature sanitized for your protection
Received on Wed Mar 25 2009 - 20:34:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:45 UTC