diff options
author | spz <spz> | 2011-02-20 21:41:59 +0000 |
---|---|---|
committer | spz <spz> | 2011-02-20 21:41:59 +0000 |
commit | 839dd58f934955796a2f8ede0b5cfe6d52243253 (patch) | |
tree | ea45cd40010bb96602287659340d2f788b909e62 | |
parent | eab59f2cfcf45628222926bf72ee69cc4ff9fd3a (diff) | |
download | pkgsrc-839dd58f934955796a2f8ede0b5cfe6d52243253.tar.gz |
Pullup ticket 3356 - requested by aymeric
functionality fix
Revisions pulled up:
- pkgsrc/pkgtools/pkg_install/files/admin/audit.c 1.17
- pkgsrc/pkgtools/pkg_install/files/lib/version.h 1.161
-----------------------------------------------------------------------------
Module Name: pkgsrc
Committed By: aymeric
Date: Fri Feb 18 15:59:52 UTC 2011
Modified Files:
pkgsrc/pkgtools/pkg_install/files/admin: audit.c
pkgsrc/pkgtools/pkg_install/files/lib: version.h
Log Message:
. fix audit-history subcommand to include patterns making use of [x-y] notation
. bump version to 20110215
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/pkgtools/pkg_install/files/admin/audit.c
cvs rdiff -u -r1.160 -r1.161 pkgsrc/pkgtools/pkg_install/files/lib/version.h
-rw-r--r-- | pkgtools/pkg_install/files/admin/audit.c | 15 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/version.h | 4 |
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..50f2ecce2f0 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.16.6.1 2011/02/20 21:41:59 spz 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.16.6.1 2011/02/20 21:41:59 spz 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..9e68405cf99 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.160.2.1 2011/02/20 21:41:59 spz 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_ */ |