Subject: pkg/35493: make fetch fails for packages without distinfo files if FAILOVER_FETCH is set
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <rosenfeld@grumpf.hope-2000.org>
List: pkgsrc-bugs
Date: 01/26/2007 20:15:01
>Number:         35493
>Category:       pkg
>Synopsis:       make fetch fails for packages without distinfo files if FAILOVER_FETCH is set
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 26 20:15:01 +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:
For packages (like wm/wmthemes) that have no distinfo files, make fetch
fails with "fetch: ``-c'' requires ``-f distinfo''." if FAILOVER_FETCH
is used.
>How-To-Repeat:
cd /usr/pkgsrc/wm/wmthemes && make fetch
>Fix:
I think mk/fetch/fetch should fall back to not verifying the checksum if
there is no distinfo file specified, just like it does for resume.


Index: mk/fetch/fetch
===================================================================
RCS file: /cvsroot/pkgsrc/mk/fetch/fetch,v
retrieving revision 1.6
diff -u -r1.6 fetch
--- mk/fetch/fetch	3 Aug 2006 14:02:58 -0000	1.6
+++ mk/fetch/fetch	26 Jan 2007 18:26:40 -0000
@@ -144,7 +144,8 @@
 done
 if ${TEST} -n "$checksum" -a -z "$distinfo"; then
 	${ECHO} 1>&2 "$self: \`\`-c'' requires \`\`-f distinfo''."
-	exit 1
+	checksum=
+	${ECHO} 1>&2 "$self: Falling back to no-checksum fetch."
 fi
 if ${TEST} -n "$resume"; then
 	if ${TEST} -z "$distinfo"; then