Subject: pkg/6413: pkg_add fails to add binary package w/o BUILD_VERSION file
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <jdolecek@jdolecek.per4mance.cz>
List: netbsd-bugs
Date: 11/09/1998 14:40:45
>Number: 6413
>Category: pkg
>Synopsis: pkg_add(1) fails to add binary package w/o BUILD_VERSION file
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 9 05:50:01 1998
>Last-Modified:
>Originator: Jaromir Dolecek
>Organization:
Per4mance, Brno, Czech Republic
>Release: 1.3.2
>Environment:
System: NetBSD jdolecek.per4mance.cz 1.3.2 NetBSD 1.3.2 (JDOLECEK) #1: Sat Nov 7 15:11:51 PST 1998 jdolecek@jdolecek.per4mance.cz:/root/usr/src/sys/arch/i386/compile/JDOLECEK i386
>Description:
I noticed the problem whle adding kde - packages failed to install
due to failure to find +BUILD_VERSION file
>How-To-Repeat:
pkg_add jpeg-6b.tgz
>Fix:
This patch changes pkg_add so that it only tries
to install BUILD_VERSION & BUILD_INFO when they actually exist.
--- add/perform.c.orig Mon Nov 9 14:35:28 1998
+++ add/perform.c Mon Nov 9 14:36:35 1998
@@ -488,8 +488,10 @@
fclose(cfile);
move_file(".", DESC_FNAME, LogDir);
move_file(".", COMMENT_FNAME, LogDir);
- move_file(".", BUILD_VERSION_FNAME, LogDir);
- move_file(".", BUILD_INFO_FNAME, LogDir);
+ if (fexists(BUILD_VERSION_FNAME))
+ move_file(".", BUILD_VERSION_FNAME, LogDir);
+ if (fexists(BUILD_INFO_FNAME))
+ move_file(".", BUILD_INFO_FNAME, LogDir);
if (fexists(DISPLAY_FNAME))
move_file(".", DISPLAY_FNAME, LogDir);
>Audit-Trail:
>Unformatted: