diff --git a/include/xbps_api.h b/include/xbps_api.h index cb8b0d52..cab14680 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -55,7 +55,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.2" -#define XBPS_API_VERSION "20111024" +#define XBPS_API_VERSION "20111024-1" #define XBPS_VERSION "0.11.0" /** diff --git a/lib/util.c b/lib/util.c index 12aee456..86c0ccaa 100644 --- a/lib/util.c +++ b/lib/util.c @@ -172,11 +172,14 @@ xbps_pkgpattern_name(const char *pkg) assert(pkg != NULL); - res = strpbrk(pkg, "><-"); + res = strpbrk(pkg, "><*?[]"); if (res == NULL) return NULL; len = strlen(pkg) - strlen(res) + 1; + if (pkg[len-2] == '-') + len--; + pkgname = malloc(len); if (pkgname == NULL) return NULL; @@ -193,7 +196,7 @@ xbps_pkgpattern_version(const char *pkg) assert(pkg != NULL); - res = strpbrk(pkg, "><-"); + res = strpbrk(pkg, "><*?[]"); if (res == NULL) return NULL;