NetBSD Problem Report #30276

From taca@SmartField.co.jp  Thu May 19 08:24:41 2005
Return-Path: <taca@SmartField.co.jp>
Received: from oike.SmartField.co.jp (oike.SmartField.co.jp [221.112.211.200])
	by narn.netbsd.org (Postfix) with ESMTP id 6D3F863B104
	for <gnats-bugs@gnats.netbsd.org>; Thu, 19 May 2005 08:24:41 +0000 (UTC)
Message-Id: <20050519082423.49F926E007@oike.SmartField.co.jp>
Date: Thu, 19 May 2005 17:24:23 +0900 (JST)
From: taca@SmartField.co.jp
Reply-To: taca@back-street.net
To: gnats-bugs@netbsd.org
Subject: pkg_add(1) can't add very old package.
X-Send-Pr-Version: 3.95

>Number:         30276
>Category:       bin
>Synopsis:       pkg_add(1) can't add very old package.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 19 08:25:00 +0000 2005
>Closed-Date:    
>Last-Modified:  Tue Dec 01 04:37:24 +0000 2009
>Originator:     Takahiro Kambe
>Release:        NetBSD 3.0_BETA
>Organization:
Smart Field Corp.

>Environment:


System: NetBSD sakai.i.SmartField.co.jp 3.0_BETA NetBSD 3.0_BETA (SAKAI) #7: Mon May  9 13:53:09 JST 2005  taca@sakai.i.SmartField.co.jp:/var/obj/sys/arch/i386/compile/SAKAI i386
Architecture: i386
Machine: i386
>Description:
	When I adding a binary package which was created by very old days
	(or manually created by pkg_create(1)), it cause error:

# pkg_add foo-1.1.tgz
pkg_add: unable to open +BUILD_INFO file.
pkg_add: can't read build information from +BUILD_INFO: No such file or directory
pkg_add: aborting.
pkg_add: 1 package addition failed

	This error isn't very informative for general users since it
	dosen't describe why such an error was occured.

>How-To-Repeat:
	Try to add a very old package.
>Fix:
	Since pkg_create(1) dosen't mandate "-B" option which speicfy
	+BUILD_INFO file, pkg_add(1) should warn the missing of +BUILD_INFO
	file and add the pacakge.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Wed, 11 Feb 2009 23:53:04 +0000
State-Changed-Why:
I have included patches that make sure pkg_info and pkg_add will
print warnings and not fail with crashes. I do not intended to allow
addition of ancient packages. The error message is about the data
that is missing and not about the file names. Does that adress your
concerns?


From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/30276 CVS commit: pkgsrc/pkgtools/pkg_install/files/info
Date: Wed, 11 Feb 2009 23:51:30 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	joerg
 Date:		Wed Feb 11 23:51:30 UTC 2009

 Modified Files:
 	pkgsrc/pkgtools/pkg_install/files/info: perform.c show.c

 Log Message:
 Don't segfault if running pkg_info on a binary package without
 +BUILD_INFO (or installed without +INSTALLED_INFO). Second half of
 PR 30276.


 To generate a diff of this commit:
 cvs rdiff -r1.49 -r1.50 pkgsrc/pkgtools/pkg_install/files/info/perform.c
 cvs rdiff -r1.23 -r1.24 pkgsrc/pkgtools/pkg_install/files/info/show.c

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

From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/30276 CVS commit: pkgsrc/pkgtools/pkg_install/files
Date: Wed, 11 Feb 2009 23:42:42 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	joerg
 Date:		Wed Feb 11 23:42:42 UTC 2009

 Modified Files:
 	pkgsrc/pkgtools/pkg_install/files/add: perform.c
 	pkgsrc/pkgtools/pkg_install/files/lib: version.h

 Log Message:
 pkg_install-20090212:
 Print the error about missing build information even when the
 +BUILD_INFO file is missing instead of segfaulting. The problem is from
 PR 30276, a solution in the form of just installing it will not be
 implemented.


 To generate a diff of this commit:
 cvs rdiff -r1.75 -r1.76 pkgsrc/pkgtools/pkg_install/files/add/perform.c
 cvs rdiff -r1.109 -r1.110 pkgsrc/pkgtools/pkg_install/files/lib/version.h

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

From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org, joerg@NetBSD.org
Cc: 
Subject: Re: bin/30276 (pkg_add(1) can't add very old package.)
Date: Sat, 14 Feb 2009 20:58:11 +0900 (JST)

 In message <20090211235304.EB6A563C17C@narn.NetBSD.org>
 	on Wed, 11 Feb 2009 23:53:04 +0000 (UTC),
 	joerg@NetBSD.org wrote:
 > Synopsis: pkg_add(1) can't add very old package.
 It was me that report this PR.  (Rerpoting mail address isn't
 available any more.)

 Anyway, I'll check it later.

 -- 
 Takahiro Kambe <taca@back-street.net>

From: David Holland <dholland@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/30276 (pkg_add(1) can't add very old package.)
Date: Tue, 1 Dec 2009 04:31:12 +0000

 (was accidentally sent to gnats-admin instead of gnats-bugs)

    ------

 From: Takahiro Kambe <taca@back-street.net>
 To: gnats-admin@netbsd.org
 Subject: Re: bin/30276 (pkg_add(1) can't add very old package.)
 Date: Fri, 20 Nov 2009 14:29:41 +0900 (JST)

 > Print the error about missing build information even when the
 > +BUILD_INFO file is missing instead of segfaulting. The problem is from
 > PR 30276, a solution in the form of just installing it will not be
 > implemented.
 If installing without +BUILD_INFO will not be implemented,
 pkg_create(8) should mandate -B option, isn't it?

 There is a case creating binary package out side of pkgsrc with
 pkg_create(8).

 And I hope some description in HISTORY in pkg_add(8) when +BUILD_INFO
 was mandated and we lost some of binary package's compatibility.

 -- 
 Takahiro Kambe <taca@back-street.net>

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 01 Dec 2009 04:37:24 +0000
State-Changed-Why:
feedback received


>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.