summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authoraymeric <aymeric@pkgsrc.org>2011-02-18 15:59:52 +0000
committeraymeric <aymeric@pkgsrc.org>2011-02-18 15:59:52 +0000
commitc28122ce4f00ce4e827c52f235c63f05beebf2ab (patch)
tree8a572ece55b3003f8b7e429b4d42ebff8d19f083 /pkgtools
parentae92e0170157bb50df375247759a36ab0fe2f5c4 (diff)
downloadpkgsrc-c28122ce4f00ce4e827c52f235c63f05beebf2ab.tar.gz
. fix audit-history subcommand to include patterns making use of [x-y] notation
. bump version to 20110215
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/files/admin/audit.c15
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
2 files changed, 13 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/admin/audit.c b/pkgtools/pkg_install/files/admin/audit.c
index 9c1ea617ba6..fce7c1a5a55 100644
--- a/pkgtools/pkg_install/files/admin/audit.c
+++ b/pkgtools/pkg_install/files/admin/audit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audit.c,v 1.16 2010/06/16 23:02:48 joerg Exp $ */
+/* $NetBSD: audit.c,v 1.17 2011/02/18 15:59:52 aymeric Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: audit.c,v 1.16 2010/06/16 23:02:48 joerg Exp $");
+__RCSID("$NetBSD: audit.c,v 1.17 2011/02/18 15:59:52 aymeric Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -384,8 +384,15 @@ check_pkg_history_pattern(const char *pkg, const char *pattern)
{
const char *delim, *end_base;
- if ((delim = strchr(pattern, '*')) != NULL) {
- if ((end_base = strrchr(pattern, '-')) == NULL)
+ if (strpbrk(pattern, "*[") != NULL) {
+ end_base = NULL;
+ for (delim = pattern;
+ *delim != '\0' && *delim != '['; delim++) {
+ if (*delim == '-')
+ end_base = delim;
+ }
+
+ if (end_base == NULL)
errx(EXIT_FAILURE, "Missing - in wildcard pattern %s",
pattern);
if ((delim = strchr(pattern, '>')) != NULL ||
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index f8131e96fc9..911be5e16a6 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.160 2010/12/12 13:18:38 wiz Exp $ */
+/* $NetBSD: version.h,v 1.161 2011/02/18 15:59:52 aymeric 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 20101212
+#define PKGTOOLS_VERSION 20110215
#endif /* _INST_LIB_VERSION_H_ */