. fix audit-history subcommand to include patterns making use of [x-y] notation

. bump version to 20110215
This commit is contained in:
aymeric 2011-02-18 15:59:52 +00:00
parent ae92e01701
commit c28122ce4f
2 changed files with 13 additions and 6 deletions

View file

@ -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 ||

View file

@ -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_ */