pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install - Be less aggressive when resizin...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/af7cb6cd12dc
branches:  trunk
changeset: 533736:af7cb6cd12dc
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Sep 27 13:30:27 2007 +0000

description:
- Be less aggressive when resizing the version field, just resize if
  the old size is not enough. Fixes PR 37031.
- Disable dependency tracking in libarchive build. Supposed to address
  PR 36953.

Bump version to 20070927.

diffstat:

 pkgtools/pkg_install/Makefile            |   5 +++--
 pkgtools/pkg_install/files/lib/dewey.c   |  29 +++++++++++++++++------------
 pkgtools/pkg_install/files/lib/version.h |   4 ++--
 3 files changed, 22 insertions(+), 16 deletions(-)

diffs (86 lines):

diff -r 2e54d9bb5848 -r af7cb6cd12dc pkgtools/pkg_install/Makefile
--- a/pkgtools/pkg_install/Makefile     Thu Sep 27 12:49:14 2007 +0000
+++ b/pkgtools/pkg_install/Makefile     Thu Sep 27 13:30:27 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.142 2007/09/08 21:57:59 jlam Exp $
+# $NetBSD: Makefile,v 1.143 2007/09/27 13:30:27 joerg Exp $
 
 # Notes to package maintainers:
 #
@@ -137,7 +137,8 @@
        cd ${WRKDIR}/libarchive &&                                      \
        ${SETENV} ${_CONFIGURE_SCRIPT_ENV}                              \
                ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS}                   \
-               ./configure --disable-shared --disable-bsdtar
+               ./configure --disable-shared --disable-bsdtar           \
+               --disable-dependency-tracking
        cd ${WRKDIR}/libarchive && ${BUILD_MAKE_CMD}
 .endif
 
diff -r 2e54d9bb5848 -r af7cb6cd12dc pkgtools/pkg_install/files/lib/dewey.c
--- a/pkgtools/pkg_install/files/lib/dewey.c    Thu Sep 27 12:49:14 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/dewey.c    Thu Sep 27 13:30:27 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dewey.c,v 1.7 2007/09/16 19:03:52 joerg Exp $ */
+/* $NetBSD: dewey.c,v 1.8 2007/09/27 13:30:28 joerg Exp $ */
 
 /*
  * Copyright © 2002 Alistair G. Crooks.  All rights reserved.
@@ -127,14 +127,17 @@
        int                 n;
        const char             *cp;
 
-       if (ap->size == 0) {
-               ap->size = 62;
-               if ((ap->v = malloc(ap->size * sizeof(int))) == NULL)
-                       err(EXIT_FAILURE, "mkver malloc failed");
-       } else {
-               ap->size *= 2;
-               if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) == NULL)
-                       err(EXIT_FAILURE, "mkver realloc failed");
+       if (ap->c == ap->size) {
+               if (ap->size == 0) {
+                       ap->size = 62;
+                       if ((ap->v = malloc(ap->size * sizeof(int))) == NULL)
+                               err(EXIT_FAILURE, "mkver malloc failed");
+               } else {
+                       ap->size *= 2;
+                       if ((ap->v = realloc(ap->v, ap->size * sizeof(int)))
+                           == NULL)
+                               err(EXIT_FAILURE, "mkver realloc failed");
+               }
        }
        if (isdigit((unsigned char)*num)) {
                for (cp = num, n = 0 ; isdigit((unsigned char)*num) ; num++) {
@@ -159,9 +162,11 @@
        if (isalpha((unsigned char)*num)) {
                ap->v[ap->c++] = Dot;
                cp = strchr(alphas, tolower((unsigned char)*num));
-               ap->size *= 2;
-               if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) == NULL)
-                       err(EXIT_FAILURE, "mkver realloc failed");
+               if (ap->c == ap->size) {
+                       ap->size *= 2;
+                       if ((ap->v = realloc(ap->v, ap->size * sizeof(int))) == NULL)
+                               err(EXIT_FAILURE, "mkver realloc failed");
+               }
                ap->v[ap->c++] = (int)(cp - alphas) + 1;
                return 1;
        }
diff -r 2e54d9bb5848 -r af7cb6cd12dc pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h  Thu Sep 27 12:49:14 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h  Thu Sep 27 13:30:27 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.82 2007/09/16 19:03:52 joerg Exp $       */
+/*     $NetBSD: version.h,v 1.83 2007/09/27 13:30:28 joerg Exp $       */
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -33,6 +33,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION "20070916"
+#define PKGTOOLS_VERSION "20070927"
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index