Subject: Re: make release of NetBSD 4.0_BETA fails
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 08/31/2006 21:18:50
On Thu, 31 Aug 2006, Dave Tyson wrote:
> Just cvs updated NetBSD 4.0_BETA to todays sources and run 
> 
> ./build.sh -U -T /usr/tools -O /usr/obj  tools
> ./build.sh -U -T /usr/tools  -O /usr/obj kernel=GENERIC
> ./build.sh -u -U -x -T /usr/tools -O /usr/obj release
> 
> The make release bombed out near the end with                         
> "nbinstall: MAKEDEV: stat: No such file or directory".                
>
> Prior to the build both /usr/obj & /usr/tools were empty.

This happens if you ever do a "make" without the flags that would be
passed from build.sh.  Some files, probably including src/etc/MAKEDEV,
end up in the source directory because, at the time you ran the errant
make process, there was no obj directory.  A subsequent make with an obj
directory gets confused: at the point where it decides whether MAKEDEV
is up to date, it sees that it already exists in the src dir, and thinks
that it's up to date; but later when it tries to do something with
MAKEDEV, it explicitly uses the obj dir, and the file does not exist.

If you use etcupdate with the "wrong" flags (e.g. with "-s /usr/src"),
it will run "make" in the "wrong" way, triggering this problem.  I think
we should just remove the ability to pass "-s srcdir" to etcupdate, and
force people to use "-s etc.tgz" or "-s tmpdir".

> I have seen this in the past and had to trash /usr/src and cvs co from
> scratch to get around it

There's no need for that.  Just run "cvs update" and delete the files
that it reports are in your source tree but not in CVS.

--apb (Alan Barrett)