From 15be7b43a4740e21616c20f4f0eb53d7a5cbb670 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 14 Jan 2010 01:00:42 +0100 Subject: [PATCH] xbps_pkgmatch: before checking pattern with csh_match(), try to see if a full match with strcmp() is enough. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100114000042-ge4iajc9jownixhe --- lib/pkgmatch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pkgmatch.c b/lib/pkgmatch.c index 0c0fc373..cacf3909 100644 --- a/lib/pkgmatch.c +++ b/lib/pkgmatch.c @@ -115,6 +115,10 @@ xbps_pkgdep_match(const char *instpkg, char *pattern) memset(&basefname, 0, sizeof(basefname)); + /* Check for a full match with strcmp, otherwise try csh_match() */ + if (strcmp(instpkg, pattern) == 0) + return 1; + condition = strpbrk(pattern, "><="); if (condition) { const char *ch;