Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2003 12:43:31 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Ade Lovett <ade@freebsd.org>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: INDEX build failed
Message-ID:  <20030911114331.GA23712@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <7F164408-E3E2-11D7-851A-000A956B6386@FreeBSD.org>
References:  <20030909153557.GA7136@rot13.obsecurity.org> <7F164408-E3E2-11D7-851A-000A956B6386@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 10, 2003 at 03:59:56PM -0700, Ade Lovett wrote:
>=20
> On Tuesday, Sep 9, 2003, at 08:35 US/Pacific, Kris Kennaway wrote:
> >Most INDEX failures can be tracked down just by running 'make
> >describe' instead (this is what is used to construct the index).
> >Also, the reason the cvs logs are included in the mails is so you can
> >narrow down the cause of failure to a few commits.
>=20
> Perhaps it would be useful to change things around a little, then:
>=20
> 1.  make a note of the relevant cvs logs, as now
> 2.  run 'make describe', if that fails, send out the last few lines,=20
> and stop
> 3.  run 'make index' as now.
>=20
> So it ends up calling make describe twice, instead of once, though that=
=20
> could be worked around, with the end result being a much clearer=20
> indication of what failed.

Running 'make describe' takes quite some time.  It's fairly easy to
make the Tools/make_index script report where in the 'make describe'
output it got something unexpected:

--- Tools/make_index.bak	Wed Feb 26 14:25:52 2003
+++ Tools/make_index	Thu Sep 11 11:58:15 2003
@@ -65,6 +65,10 @@
     return \@unique;
 }
=20
+# Keep track of which port is being processed using the markers in the
+# 'make describe' output
+my $this_port =3D "";
+
 # Save where we are so that we can map all directories formed
 # from ${PORTSDIR} to their canonical location '/usr/ports/...'.
 chomp($pwd =3D `pwd`);
@@ -72,7 +76,18 @@
 # Read each line of output generated by the 'index' target.
 while (<>) {
     chomp;
+
+    if (m/^=3D=3D=3D> (\S+)/o) {
+		$this_port =3D $1;
+		next;
+	}
+
     my @f =3D split(/\|/);
+
+    unless (@f >=3D 7) {
+		warn "$0:$.:$this_port: Input format incorrect: $_\n";
+		next;
+	}
=20
   # Force to canonical form.
     $f[1] =3D~ s!^$pwd!/usr/ports!o;


--- Makefile.bak	Thu Sep 11 11:59:15 2003
+++ Makefile	Thu Sep 11 12:00:25 2003
@@ -70,7 +70,7 @@
 	@echo -n "Generating ${INDEXFILE} - please wait.."; \
 	export LOCALBASE=3D/nonexistentlocal; \
 	export X11BASE=3D/nonexistentx; \
-	cd ${.CURDIR} && make describe ECHO_MSG=3D"echo > /dev/null" | \
+	cd ${.CURDIR} && make describe | \
 		perl ${.CURDIR}/Tools/make_index | \
 	sed -e 's/  */ /g' -e 's/|  */|/g' -e 's/  *|/|/g' -e "s,$${LOCALBASE},/u=
sr/local," -e "s,$${X11BASE},/usr/X11R6," > ${INDEXFILE}
 .if !defined(INDEX_NOSORT)


If I deliberately break the archivers/arc Makefile, these changes result in
output like this:

happy-idiot-talk:/usr/ports:% sudo make index
Generating INDEX - please wait.."Makefile", line 23: Need an operator
make: fatal errors encountered -- cannot continue
/usr/ports/Tools/make_index:5:archivers/arc: Input format incorrect: *** Er=
ror code 1
/usr/ports/Tools/make_index:6:archivers/arc: Input format incorrect:=20
/usr/ports/Tools/make_index:7:archivers/arc: Input format incorrect: Stop i=
n /usr/ports/archivers.
/usr/ports/Tools/make_index:8:archivers/arc: Input format incorrect: *** Er=
ror code 1
/usr/ports/Tools/make_index:9:archivers/arc: Input format incorrect:=20
/usr/ports/Tools/make_index:10:archivers/arc: Input format incorrect: Stop =
in /usr/ports.
 Done.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--k1lZvvs/B4yU6o8G
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/YF/jdtESqEQa7a0RAuivAJ98ViaYlU/pMVcfhMp86qvXmZWLgQCeOkZn
vPWmGOqFMVLBDgvXBguU+7I=
=jIKF
-----END PGP SIGNATURE-----

--k1lZvvs/B4yU6o8G--



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