Subject: Re: build.sh and -U confusion
To: Bill Studenmund <wrstuden@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: current-users
Date: 08/15/2005 16:09:51
Bill Studenmund <wrstuden@netbsd.org> writes:

> On Sat, Aug 13, 2005 at 09:08:05PM +0100, Matthias Scheler wrote:
> > On Sat, Aug 13, 2005 at 03:33:33PM -0400, Greg Troxel wrote:
> > > > Good idea. What about this:
> > > 
> > > do you mean all 3, or choose 1?
> > 
> > All 3.
> > 
> > > for install, or refuses if the existence of the metalog and the -U
> > > flag don't sense.  I'm a bit leery of making such decisions
> > > automatically, but fine with failing if they are wrong.
> > 
> > If it can reliably detect the error it can also avoid it.
> 
> The problem I see is that with a brand new destdir, there will be no 
> metalog. So we would move from using command-line arguements to having to 
> touch or not touch a file to get a behavior.
> 
> I think options 1 & 2 from the original list are great for installs. For 
> building, though, if you set -U, you should get an unprived build. Builds 
> w/o -U but with a metalog erroring out would be fine too.

I saw this as saying that for build:

  if a destdir exists and is nonempty and the sense of -U and whether
  METALOG exists don't match, error out

This doesn't change using the flag, or behavior with an empty destdir
- but prevents mixed -U/not-U in a single destdir.

For installs, I think whether to use -U can be determined, so this
could be automated.


-- 
        Greg Troxel <gdt@ir.bbn.com>