Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 1998 19:10:31 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Mike Smith <mike@smith.net.au>
Cc:        committers@FreeBSD.org
Subject:   Re: make.conf 
Message-ID:  <23567.904356631@time.cdrom.com>
In-Reply-To: Your message of "Fri, 28 Aug 1998 18:49:28 -0000." <199808281849.SAA06317@dingo.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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)

I'll further commit to using any auto-merger tools that people may
come up with from sysinstall if they make that a comparatively easy
thing to do.  It's long been on the TODO list, just not done.

For rc.conf and make.conf, which contains only variable declarations,
this is actually pretty easy since you really just have to:

1. Read in the new file, preserving comments and storing all the
   name/value pairs in some sort of table (sysinstall actually does
   this now).

2. Read just the name/value pairs from the old file and override
   any existing values in the table with the previous data.

3. Write back out a composite file with comments and updated variable
   values.

Erm, right?  I don't see any reason why that wouldn't work unless the
default value of something has changed and you end up propagating an
old default value back into your new file.  I guess that's the one
downside to this approach.

- Jordan



> 
> -- 
> \\  Sometimes you're ahead,       \\  Mike Smith
> \\  sometimes you're behind.      \\  mike@smith.net.au
> \\  The race is long, and in the  \\  msmith@freebsd.org
> \\  end it's only with yourself.  \\  msmith@cdrom.com
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23567.904356631>