Date: Fri, 28 Aug 1998 22:18:09 -0700 From: John Polstra <jdp@polstra.com> To: committers@freebsd.org Subject: Re: make.conf Message-ID: <199808290518.WAA14604@austin.polstra.com> In-Reply-To: <199808281849.SAA06317@dingo.cdrom.com> References: <199808281849.SAA06317@dingo.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <199808281849.SAA06317@dingo.cdrom.com>, Mike Smith <mike@smith.net.au> wrote: > Agreed. It's not *impossibly* hard to merge at least some of this > stuff; both rc.conf and make.conf are reasonably straightforward. > Don't we have any aspiring Perl5 or Tcl weenies out there that would > like to make their mark? 8) Pah, we don't need no stinkin' Perl5 or Tcl. You can get a good merge most of the time with a simple "diff3 -m". Joerg and I worked it out independently some time ago, though neither of us has followed through with it. The scheme is as follows, looking just at rc.conf for concreteness. In the steady state, we have both our customized version of the file (adopting the terminology of diff3, we'll call it "MINE") and a saved copy of the corresponding released version (which we'll call "OLDER"). Now we want to merge our customizations into a new released version (called "YOURS"). The merge is done by: diff3 -m MINE OLDER YOURS > NEW Then check for conflicts (the exit code of diff3 indicates that). If there are conflicts, invoke an editor for the user to manually resolve them. Once the conflicts are gone, get back to the steady state with: mv NEW MINE mv YOURS OLDER Repeat for the other customizable files. You can get a poor man's version of this if you keep a CVS repository around. Simply edit the files your checked-out source tree, and then copy them into /etc. To merge, all you have to do is a "cvs update". CVS does the same diff3 operation that I described above. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808290518.WAA14604>