pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/pkgsrc-2009Q3]: pkgsrc/pkgtools/pkg_install/files/lib Pullup ticket #...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4ed4bcd3dfbd
branches: pkgsrc-2009Q3
changeset: 399955:4ed4bcd3dfbd
user: tron <tron%pkgsrc.org@localhost>
date: Fri Oct 23 10:28:23 2009 +0000
description:
Pullup ticket #2921 - requested by joerg
pkg_install: bug fix
Revisions pulled up:
- pkgtools/pkg_install/files/lib/pkgdb.c 1.36
- pkgtools/pkg_install/files/lib/version.h 1.142
---
Module Name: pkgsrc
Committed By: joerg
Date: Thu Oct 22 22:51:29 UTC 2009
Modified Files:
pkgsrc/pkgtools/pkg_install/files/lib: pkgdb.c version.h
Log Message:
pkg_install-20091009:
Do not overwrite a string with itself using snprintf. This breaks
setting the pkgdb directory internally on Linux. Explicitly check
if the string is the same and otherwise just use xstrdup.
diffstat:
pkgtools/pkg_install/files/lib/pkgdb.c | 14 +++++++++-----
pkgtools/pkg_install/files/lib/version.h | 4 ++--
2 files changed, 11 insertions(+), 7 deletions(-)
diffs (59 lines):
diff -r f1783367ac9c -r 4ed4bcd3dfbd pkgtools/pkg_install/files/lib/pkgdb.c
--- a/pkgtools/pkg_install/files/lib/pkgdb.c Fri Oct 23 10:23:07 2009 +0000
+++ b/pkgtools/pkg_install/files/lib/pkgdb.c Fri Oct 23 10:28:23 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pkgdb.c,v 1.35 2009/09/11 18:00:13 joerg Exp $ */
+/* $NetBSD: pkgdb.c,v 1.35.2.1 2009/10/23 10:28:23 tron Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: pkgdb.c,v 1.35 2009/09/11 18:00:13 joerg Exp $");
+__RCSID("$NetBSD: pkgdb.c,v 1.35.2.1 2009/10/23 10:28:23 tron Exp $");
/*-
* Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
@@ -78,7 +78,6 @@
static DB *pkgdbp;
static char *pkgdb_dir = NULL;
-static char pkgdb_cache[MaxPathSize];
/*
* Open the pkg-database
@@ -310,8 +309,13 @@
void
_pkgdb_setPKGDB_DIR(const char *dir)
{
- (void) snprintf(pkgdb_cache, sizeof(pkgdb_cache), "%s", dir);
- pkgdb_dir = pkgdb_cache;
+ char *new_dir;
+
+ if (dir == pkgdb_dir)
+ return;
+ new_dir = xstrdup(dir);
+ free(pkgdb_dir);
+ pkgdb_dir = new_dir;
}
char *
diff -r f1783367ac9c -r 4ed4bcd3dfbd pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h Fri Oct 23 10:23:07 2009 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h Fri Oct 23 10:28:23 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.139 2009/10/08 16:16:12 joerg Exp $ */
+/* $NetBSD: version.h,v 1.139.2.1 2009/10/23 10:28:23 tron Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20091008"
+#define PKGTOOLS_VERSION "20091009"
#endif /* _INST_LIB_VERSION_H_ */
Home |
Main Index |
Thread Index |
Old Index