Subject: pkg/35488: make index fails if there is no INDEX file
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <rosenfeld@grumpf.hope-2000.org>
List: pkgsrc-bugs
Date: 01/26/2007 19:00:00
>Number:         35488
>Category:       pkg
>Synopsis:       make index fails if there is no INDEX file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 26 19:00:00 +0000 2007
>Originator:     rosenfeld@grumpf.hope-2000.org
>Release:        pkgsrc-2006Q4
>Organization:
>Environment:
System: NetBSD panic 4.0_BETA2 NetBSD 4.0_BETA2 (PANIC) #1: Sun Jan 7 15:45:57 CET 2007 woodstoc@panic:/usr/obj/sys/arch/i386/compile.i386/PANIC i386
Architecture: i386
Machine: i386
>Description:
"make index" tries to remove an older INDEX file before building a new one,
but it bombs if there is none to be removed.

>How-To-Repeat:
cd /usr/pkgsrc && rm INDEX && make index

>Fix:

this patch is against the Makefile, but afaik that code is in
mk/misc/toplevel.mk now, so it should be applied there

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/Makefile,v
retrieving revision 1.78
diff -u -r1.78 Makefile
--- Makefile	29 Dec 2006 19:02:25 -0000	1.78
+++ Makefile	26 Jan 2007 18:25:56 -0000
@@ -139,7 +139,7 @@
 
 .PHONY: index
 index:
-	@${RM} ${.CURDIR}/INDEX
+	-@${RM} ${.CURDIR}/INDEX
 	@${MAKE} ${.CURDIR}/INDEX
 
 ${.CURDIR}/INDEX: