Subject: Re: i386-current not building distribution
To: None <htodd@twofifty.com>
From: Havard Eidnes <he@NetBSD.org>
List: current-users
Date: 01/05/2006 19:12:53
> I don't see anything in UPDATING, but I get this error when building
> "distribution sets" using build.sh:
>
> postinstall-fix-obsolete =3D=3D=3D> .
>     =3D=3D=3D Removing obsolete files =3D=3D=3D
> sh /usr/src/usr.sbin/postinstall/postinstall -s /usr/src -d /usr/src/=
obj.i386/destdir.i386/ fix obsolete
> Source directory: /usr/src
> Target directory: /usr/src/obj.i386/destdir.i386/
> obsolete fix:
> postinstall fixes passed: obsolete
> postinstall fixes failed:
>     =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
> checkflist =3D=3D=3D> distrib/sets
> /usr/src/obj.i386/tooldir.NetBSD-3.99.15-i386/bin/nbmtree -C -k all -=
N /usr/src/etc </usr/src/obj.i386/destdir.i386/METALOG >/usr/src/obj.i3=
86/destdir.i386/METALOG.sanitised
> nbmtree: ./usr: No such file or directory
> nbmtree: failed at line 2 of the specification

I got the exact same problem.  I beleive this is only triggered
if you are doing an UPDATE build (which is what I do most often).

I beleive that if you pass your METALOG file through this simple
perl script, you'll be able to re-do an UPDATE build, i.e. not
resort to the suggested workaround to do a complete rebuild.

BTW, it appears that METALOG will grow without bounds if you
repeatedly do UPDATE builds -- mine had grown to 24MB, while the
pared-down version I get from running this script is 2.3MB...

------------------------------
#! /usr/bin/perl

while (<>) {
    chomp;
    split;
    $line{$_[0]} =3D $_;
}

foreach my $k (sort keys %line) {
    printf("%s\n", $line{$k});
}
------------------------------

What this script does is two things:

1) where multiple entries exist for the same name, only include
   the last one
2) spit the entries out in sorted order, so that the entry for
   ./usr comes before ./usr/include/a.out.h (which it didn't,
   which was probably the reason for mtree's complaint)

Regards,

- H=E5vaard