Wed Feb 11 23:42:42 2009 UTC ()
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.


(joerg)
diff -r1.75 -r1.76 pkgsrc/pkgtools/pkg_install/files/add/perform.c
diff -r1.109 -r1.110 pkgsrc/pkgtools/pkg_install/files/lib/version.h

cvs diff -r1.75 -r1.76 pkgsrc/pkgtools/pkg_install/files/add/perform.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/add/perform.c 2009/02/03 19:47:37 1.75
+++ pkgsrc/pkgtools/pkg_install/files/add/perform.c 2009/02/11 23:42:42 1.76
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1/* $NetBSD: perform.c,v 1.75 2009/02/03 19:47:37 joerg Exp $ */ 1/* $NetBSD: perform.c,v 1.76 2009/02/11 23:42:42 joerg Exp $ */
2#if HAVE_CONFIG_H 2#if HAVE_CONFIG_H
3#include "config.h" 3#include "config.h"
4#endif 4#endif
5#include <nbcompat.h> 5#include <nbcompat.h>
6#if HAVE_SYS_CDEFS_H 6#if HAVE_SYS_CDEFS_H
7#include <sys/cdefs.h> 7#include <sys/cdefs.h>
8#endif 8#endif
9__RCSID("$NetBSD: perform.c,v 1.75 2009/02/03 19:47:37 joerg Exp $"); 9__RCSID("$NetBSD: perform.c,v 1.76 2009/02/11 23:42:42 joerg Exp $");
10 10
11/*- 11/*-
12 * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> 12 * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
13 * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org> 13 * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org>
14 * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org> 14 * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org>
15 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> 15 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>
16 * All rights reserved. 16 * All rights reserved.
17 * 17 *
18 * Redistribution and use in source and binary forms, with or without 18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions 19 * modification, are permitted provided that the following conditions
20 * are met: 20 * are met:
21 * 21 *
22 * 1. Redistributions of source code must retain the above copyright 22 * 1. Redistributions of source code must retain the above copyright
@@ -448,27 +448,27 @@ check_other_installed(struct pkg_task *p @@ -448,27 +448,27 @@ check_other_installed(struct pkg_task *p
448 return status; 448 return status;
449} 449}
450 450
451/* 451/*
452 * Read package build information from meta data. 452 * Read package build information from meta data.
453 */ 453 */
454static int 454static int
455read_buildinfo(struct pkg_task *pkg) 455read_buildinfo(struct pkg_task *pkg)
456{ 456{
457 const char *data, *eol, *next_line; 457 const char *data, *eol, *next_line;
458 458
459 data = pkg->meta_data.meta_build_info; 459 data = pkg->meta_data.meta_build_info;
460 460
461 for (; *data != '\0'; data = next_line) { 461 for (; data != NULL && *data != '\0'; data = next_line) {
462 if ((eol = strchr(data, '\n')) == NULL) { 462 if ((eol = strchr(data, '\n')) == NULL) {
463 eol = data + strlen(data); 463 eol = data + strlen(data);
464 next_line = eol; 464 next_line = eol;
465 } else 465 } else
466 next_line = eol + 1; 466 next_line = eol + 1;
467 467
468 if (strncmp(data, "OPSYS=", 6) == 0) 468 if (strncmp(data, "OPSYS=", 6) == 0)
469 pkg->buildinfo[BI_OPSYS] = dup_value(data, eol); 469 pkg->buildinfo[BI_OPSYS] = dup_value(data, eol);
470 else if (strncmp(data, "OS_VERSION=", 11) == 0) 470 else if (strncmp(data, "OS_VERSION=", 11) == 0)
471 pkg->buildinfo[BI_OS_VERSION] = dup_value(data, eol); 471 pkg->buildinfo[BI_OS_VERSION] = dup_value(data, eol);
472 else if (strncmp(data, "MACHINE_ARCH=", 13) == 0) 472 else if (strncmp(data, "MACHINE_ARCH=", 13) == 0)
473 pkg->buildinfo[BI_MACHINE_ARCH] = dup_value(data, eol); 473 pkg->buildinfo[BI_MACHINE_ARCH] = dup_value(data, eol);
474 else if (strncmp(data, "IGNORE_RECOMMENDED=", 19) == 0) 474 else if (strncmp(data, "IGNORE_RECOMMENDED=", 19) == 0)

cvs diff -r1.109 -r1.110 pkgsrc/pkgtools/pkg_install/files/lib/version.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/lib/version.h 2009/02/05 17:22:19 1.109
+++ pkgsrc/pkgtools/pkg_install/files/lib/version.h 2009/02/11 23:42:42 1.110
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: version.h,v 1.109 2009/02/05 17:22:19 joerg Exp $ */ 1/* $NetBSD: version.h,v 1.110 2009/02/11 23:42:42 joerg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Thomas Klausner. All rights reserved. 4 * Copyright (c) 2001 Thomas Klausner. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -17,16 +17,16 @@ @@ -17,16 +17,16 @@
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#ifndef _INST_LIB_VERSION_H_ 27#ifndef _INST_LIB_VERSION_H_
28#define _INST_LIB_VERSION_H_ 28#define _INST_LIB_VERSION_H_
29 29
30#define PKGTOOLS_VERSION "20090205" 30#define PKGTOOLS_VERSION "20090212"
31 31
32#endif /* _INST_LIB_VERSION_H_ */ 32#endif /* _INST_LIB_VERSION_H_ */