NetBSD Problem Report #35494

From rosenfeld@grumpf.hope-2000.org  Fri Jan 26 20:24:53 2007
Return-Path: <rosenfeld@grumpf.hope-2000.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 9B48563B8AD
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 26 Jan 2007 20:24:53 +0000 (UTC)
Message-Id: <200701262025.l0QKP9eU008518@panic.headcrashers.bnfh>
Date: Fri, 26 Jan 2007 21:25:09 +0100 (CET)
From: rosenfeld@grumpf.hope-2000.org
Reply-To: rosenfeld@grumpf.hope-2000.org
To: gnats-bugs@NetBSD.org
Subject: ./ prefixed filenames in distinfo files break PKG_RESUME_TRANSFERS
X-Send-Pr-Version: 3.95

>Number:         35494
>Category:       pkg
>Synopsis:       ./ prefixed filenames in distinfo files break PKG_RESUME_TRANSFERS
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 26 20:25:00 +0000 2007
>Closed-Date:    Sat Jul 14 04:45:02 +0000 2007
>Last-Modified:  Sat Jul 14 05:50: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:
If PKG_RESUME_TRANSFERS is set, fetching distfiles for packages that
have ./ prefixed filenames in their distinfo file will only create
0-byte files but not fetch the distfiles.

This is because mk/fetch/fetch touches the distfile and then tries to
verify its checksum by running mk/checksum/checksum, which will not
recognize the distinfo entry because of the ./ prefix.

(see http://mail-index.netbsd.org/tech-pkg/2006/10/07/0002.html)
>How-To-Repeat:
set PKG_RESUME_TRANSFERS and try to fetch the distfiles for www/opera

>Fix:
Removing the ./ from the distinfo entries broke more things than it was
supposed to fix, so I guess it is better to fix mk/checksum/checksum to
strip the ./ just like mk/fetch/fetch does.


Index: mk/checksum/checksum
===================================================================
RCS file: /cvsroot/pkgsrc/mk/checksum/checksum,v
retrieving revision 1.10
diff -u -r1.10 checksum
--- mk/checksum/checksum	15 Dec 2006 13:15:06 -0000	1.10
+++ mk/checksum/checksum	26 Jan 2007 18:26:40 -0000
@@ -88,7 +88,9 @@
 # Process required arguments
 ${TEST} $# -gt 0 || { usage; exit 1; }
 distinfo="$1"; shift
-files="$@"
+for file in $@; do
+	files="$files ${file#./}"
+done

 if ${TEST} ! -f "$distinfo"; then
 	${ECHO} 1>&2 "$self: distinfo file missing: $distinfo"
@@ -135,6 +137,9 @@
 	eval "tmp=\"\$_alg_${d_alg}\""
 	${TEST} -n "$tmp" || eval "_alg_${d_alg}=\"$files\""

+	d_file="${d_file#(}"
+	d_file="(${d_file#./}"
+
 	for file in $files; do
 		sfile="${file%$suffix}"
 		${TEST} "$d_file" = "($sfile)" || continue

>Release-Note:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/35494: ./ prefixed filenames in distinfo files break PKG_RESUME_TRANSFERS
Date: Fri, 26 Jan 2007 21:35:49 +0100

 On Fri, Jan 26, 2007 at 08:25:01PM +0000, rosenfeld@grumpf.hope-2000.org wrote:
 > >Fix:
 > Removing the ./ from the distinfo entries broke more things than it was
 > supposed to fix, so I guess it is better to fix mk/checksum/checksum to
 > strip the ./ just like mk/fetch/fetch does.

 No, the entries are wrong and the three packages involved need to be
 fixed.

 Joerg

From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/35494 CVS commit: pkgsrc/www/opera
Date: Sat, 14 Jul 2007 04:35:44 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Sat Jul 14 04:35:44 UTC 2007

 Modified Files:
 	pkgsrc/www/opera: Makefile distinfo

 Log Message:
 DIST_SUBDIR=. break PKG_RESUME_TRANSFERS, sufficient just define as empty.
 Fixes PR 35494.


 To generate a diff of this commit:
 cvs rdiff -r1.67 -r1.68 pkgsrc/www/opera/Makefile
 cvs rdiff -r1.21 -r1.22 pkgsrc/www/opera/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/35494 CVS commit: pkgsrc/chat
Date: Sat, 14 Jul 2007 04:39:17 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Sat Jul 14 04:39:17 UTC 2007

 Modified Files:
 	pkgsrc/chat/aim: Makefile distinfo
 	pkgsrc/chat/ymessenger: Makefile distinfo

 Log Message:
 DIST_SUBDIR=. break PKG_RESUME_TRANSFER, sufficient just define as empty.
 Fixes PR 35494.


 To generate a diff of this commit:
 cvs rdiff -r1.15 -r1.16 pkgsrc/chat/aim/Makefile
 cvs rdiff -r1.6 -r1.7 pkgsrc/chat/aim/distinfo
 cvs rdiff -r1.16 -r1.17 pkgsrc/chat/ymessenger/Makefile
 cvs rdiff -r1.7 -r1.8 pkgsrc/chat/ymessenger/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: obache@netbsd.org
State-Changed-When: Sat, 14 Jul 2007 04:45:02 +0000
State-Changed-Why:
All ./ prefix on fielnames in distinfo had been gone away.


From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/35494 CVS commit: pkgsrc/mk/fetch
Date: Sat, 14 Jul 2007 05:45:36 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Sat Jul 14 05:45:35 UTC 2007

 Modified Files:
 	pkgsrc/mk/fetch: fetch.mk

 Log Message:
 Allow empty DIST_SUBDIR, need to fix PR 35494.


 To generate a diff of this commit:
 cvs rdiff -r1.25 -r1.26 pkgsrc/mk/fetch/fetch.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.