INDEX build failed

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Sep 11 04:44:10 PDT 2003


On Wed, Sep 10, 2003 at 03:59:56PM -0700, Ade Lovett wrote:
> 
> 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.
> 
> Perhaps it would be useful to change things around a little, then:
> 
> 1.  make a note of the relevant cvs logs, as now
> 2.  run 'make describe', if that fails, send out the last few lines, 
> and stop
> 3.  run 'make index' as now.
> 
> So it ends up calling make describe twice, instead of once, though that 
> could be worked around, with the end result being a much clearer 
> 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;
 }
 
+# Keep track of which port is being processed using the markers in the
+# 'make describe' output
+my $this_port = "";
+
 # Save where we are so that we can map all directories formed
 # from ${PORTSDIR} to their canonical location '/usr/ports/...'.
 chomp($pwd = `pwd`);
@@ -72,7 +76,18 @@
 # Read each line of output generated by the 'index' target.
 while (<>) {
     chomp;
+
+    if (m/^===> (\S+)/o) {
+		$this_port = $1;
+		next;
+	}
+
     my @f = split(/\|/);
+
+    unless (@f >= 7) {
+		warn "$0:$.:$this_port: Input format incorrect: $_\n";
+		next;
+	}
 
   # Force to canonical form.
     $f[1] =~ 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=/nonexistentlocal; \
 	export X11BASE=/nonexistentx; \
-	cd ${.CURDIR} && make describe ECHO_MSG="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},/usr/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: *** Error code 1
/usr/ports/Tools/make_index:6:archivers/arc: Input format incorrect: 
/usr/ports/Tools/make_index:7:archivers/arc: Input format incorrect: Stop in /usr/ports/archivers.
/usr/ports/Tools/make_index:8:archivers/arc: Input format incorrect: *** Error code 1
/usr/ports/Tools/make_index:9:archivers/arc: Input format incorrect: 
/usr/ports/Tools/make_index:10:archivers/arc: Input format incorrect: Stop in /usr/ports.
 Done.

	Cheers,

	Matthew

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030911/7b2b47b7/attachment.bin


More information about the freebsd-ports mailing list