NetBSD Problem Report #26429

Received: (qmail 28448 invoked by uid 605); 25 Jul 2004 15:40:20 -0000
Message-Id: <200407251540.i6PFeDIi017135@night-porter.duskware.de>
Date: Sun, 25 Jul 2004 17:40:13 +0200 (CEST)
From: Martin Husemann <martin@duskware.de>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: martin@duskware.de
To: gnats-bugs@gnats.NetBSD.org
Subject: pkg_create does treat -B (+BUILDINFO) optional, but pkg_add does not work w/o
X-Send-Pr-Version: 3.95

>Number:         26429
>Category:       bin
>Synopsis:       pkg_create does treat -B (+BUILDINFO) optional, but pkg_add does not work w/o
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    agc
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 25 15:41:00 +0000 2004
>Closed-Date:    Mon Aug 02 07:01:55 +0000 2004
>Last-Modified:  Fri Aug 06 16:58:04 +0000 2004
>Originator:     Martin Husemann
>Release:        NetBSD 2.0
>Organization:
>Environment:
System: any
Architecture: any
Machine: any
>Description:

When creating a pkg with pkg_create the -B option (the +BUILD_INFO file)
is optional. The resulting pkg does not work, however, since pkg_add can
not work without +BUILD_INFO.

Even if used with -f (so it does not terminate due to missing +BUILD_INFO)
it will not install the pkg, since it dumps core - in varions places
strings from the buildinfo[] array (which happen to be all NULL in
case of a missing +BUILD_INFO) are used without checks to call strcmp().

>How-To-Repeat:
s.a.

>Fix:
Either make pkg_create complain about missing +BUILD_INFO contents, or make
pkg_add cope with nonexistant or incomplete +BUILD_INFO
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: agc 
State-Changed-When: Wed Jul 28 15:54:25 UTC 2004 
State-Changed-Why:  
agc has made some changes, and given them to Martin - it's difficult 
for me to test properly right now. 


Responsible-Changed-From-To: bin-bug-people->agc 
Responsible-Changed-By: agc 
Responsible-Changed-When: Wed Jul 28 15:54:25 UTC 2004 
Responsible-Changed-Why:  
agc caught the buck 

From: "Alistair G. Crooks" <agc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/26429 CVS commit: src/usr.sbin/pkg_install
Date: Fri, 30 Jul 2004 11:35:47 +0000 (UTC)

 Module Name:	src
 Committed By:	agc
 Date:		Fri Jul 30 11:35:47 UTC 2004

 Modified Files:
 	src/usr.sbin/pkg_install/add: perform.c
 	src/usr.sbin/pkg_install/lib: version.h

 Log Message:
 Re-work the code which checks the recorded build versions of a binary
 package to make pkg_add work properly when no +BUILD_INFO file exists.

 Modify the return value from read_buildinfo() to return 1 for success
 and 0 for failure.

 Use symbolic constants, rather than integers.

 If we can't read the build information, always tell of this fact.

 Bump version to 20040730

 Addresses PR 26429; a different version of these mods were verified to
 allow a +BUILD_INFO-less binary package to be added by Martin Husemann.


 To generate a diff of this commit:
 cvs rdiff -r1.101 -r1.102 src/usr.sbin/pkg_install/add/perform.c
 cvs rdiff -r1.54 -r1.55 src/usr.sbin/pkg_install/lib/version.h

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

State-Changed-From-To: feedback->closed 
State-Changed-By: agc 
State-Changed-When: Mon Aug 2 07:01:34 UTC 2004 
State-Changed-Why:  
agc added code to fix the problem 

From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/26429 CVS commit: pkgsrc/pkgtools/pkg_install/files
Date: Fri,  6 Aug 2004 16:57:03 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Fri Aug  6 16:57:03 UTC 2004

 Modified Files:
 	pkgsrc/pkgtools/pkg_install/files: configure configure.ac
 	pkgsrc/pkgtools/pkg_install/files/add: extract.c perform.c pkg_add.1
 	    pkg_add.cat1
 	pkgsrc/pkgtools/pkg_install/files/admin: main.c
 	pkgsrc/pkgtools/pkg_install/files/create: pkg_create.1 pkg_create.cat1
 	    pl.c
 	pkgsrc/pkgtools/pkg_install/files/info: pkg_info.1 pkg_info.cat1 show.c
 	pkgsrc/pkgtools/pkg_install/files/lib: pen.c pkgdb.c plist.c version.h
 	pkgsrc/pkgtools/pkg_install/files/view: linkfarm.sh.in pkg_view.1
 	    pkg_view.cat1 pkg_view.sh.in
 Added Files:
 	pkgsrc/pkgtools/pkg_install/files/bpm: bpm.sh.in
 Removed Files:
 	pkgsrc/pkgtools/pkg_install/files/bpm: bpm.sh

 Log Message:
 Sync with version 20040730 from src/usr.sbin/pkg_install on the HEAD:

 > Re-work the code which checks the recorded build versions of a binary
 > package to make pkg_add work properly when no +BUILD_INFO file exists.
 >
 > Modify the return value from read_buildinfo() to return 1 for success
 > and 0 for failure.
 >
 > Use symbolic constants, rather than integers.
 >
 > If we can't read the build information, always tell of this fact.
 >
 > Bump version to 20040730
 >
 > Addresses PR 26429; a different version of these mods were verified to
 > allow a +BUILD_INFO-less binary package to be added by Martin Husemann.


 To generate a diff of this commit:
 cvs rdiff -r1.10 -r1.11 pkgsrc/pkgtools/pkg_install/files/configure
 cvs rdiff -r1.8 -r1.9 pkgsrc/pkgtools/pkg_install/files/configure.ac
 cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/add/extract.c
 cvs rdiff -r1.23 -r1.24 pkgsrc/pkgtools/pkg_install/files/add/perform.c
 cvs rdiff -r1.8 -r1.9 pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 \
     pkgsrc/pkgtools/pkg_install/files/add/pkg_add.cat1
 cvs rdiff -r1.14 -r1.15 pkgsrc/pkgtools/pkg_install/files/admin/main.c
 cvs rdiff -r1.2 -r0 pkgsrc/pkgtools/pkg_install/files/bpm/bpm.sh
 cvs rdiff -r0 -r1.1 pkgsrc/pkgtools/pkg_install/files/bpm/bpm.sh.in
 cvs rdiff -r1.6 -r1.7 pkgsrc/pkgtools/pkg_install/files/create/pkg_create.1
 cvs rdiff -r1.5 -r1.6 \
     pkgsrc/pkgtools/pkg_install/files/create/pkg_create.cat1
 cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/create/pl.c
 cvs rdiff -r1.9 -r1.10 pkgsrc/pkgtools/pkg_install/files/info/pkg_info.1
 cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/info/pkg_info.cat1
 cvs rdiff -r1.6 -r1.7 pkgsrc/pkgtools/pkg_install/files/info/show.c
 cvs rdiff -r1.13 -r1.14 pkgsrc/pkgtools/pkg_install/files/lib/pen.c
 cvs rdiff -r1.19 -r1.20 pkgsrc/pkgtools/pkg_install/files/lib/pkgdb.c
 cvs rdiff -r1.9 -r1.10 pkgsrc/pkgtools/pkg_install/files/lib/plist.c
 cvs rdiff -r1.31 -r1.32 pkgsrc/pkgtools/pkg_install/files/lib/version.h
 cvs rdiff -r1.2 -r1.3 pkgsrc/pkgtools/pkg_install/files/view/linkfarm.sh.in
 cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/view/pkg_view.1
 cvs rdiff -r1.6 -r1.7 pkgsrc/pkgtools/pkg_install/files/view/pkg_view.cat1
 cvs rdiff -r1.4 -r1.5 pkgsrc/pkgtools/pkg_install/files/view/pkg_view.sh.in

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


From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/26429 CVS commit: pkgsrc/doc
Date: Fri,  6 Aug 2004 16:57:05 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Fri Aug  6 16:57:05 UTC 2004

 Modified Files:
 	pkgsrc/doc: CHANGES

 Log Message:
 Sync with version 20040730 from src/usr.sbin/pkg_install on the HEAD:

 > Re-work the code which checks the recorded build versions of a binary
 > package to make pkg_add work properly when no +BUILD_INFO file exists.
 >
 > Modify the return value from read_buildinfo() to return 1 for success
 > and 0 for failure.
 >
 > Use symbolic constants, rather than integers.
 >
 > If we can't read the build information, always tell of this fact.
 >
 > Bump version to 20040730
 >
 > Addresses PR 26429; a different version of these mods were verified to
 > allow a +BUILD_INFO-less binary package to be added by Martin Husemann.


 To generate a diff of this commit:
 cvs rdiff -r1.6813 -r1.6814 pkgsrc/doc/CHANGES

 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.