From 2d68c5fb2019f6fd5880d0dae3077b24aae183c9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 28 Apr 2010 23:46:59 +0200 Subject: [PATCH] xbps-repo(8): fixed the 'search' target to also match patterns against its description, and not only from the package/version touple. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100428214659-lz1au5hjg80h4j37 --- NEWS | 3 +++ bin/xbps-repo/util.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 1c3953fb..41ef38f3 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ xbps-0.5.0 (2010-05-01): + * xbps-repo(8): fixed the 'search' target to also match patterns against + its description, and not only from the package/version touple. + * Cleaned up the code by using the LLVM's clang static analyzer, found two possible NULL pointer dereferences and dead core. diff --git a/bin/xbps-repo/util.c b/bin/xbps-repo/util.c index 549db2b3..640b742c 100644 --- a/bin/xbps-repo/util.c +++ b/bin/xbps-repo/util.c @@ -196,6 +196,8 @@ show_pkg_namedesc(prop_object_t obj, void *arg, bool *loop_done) printf(" %s - %s\n", pkgver, desc); else if (strcmp(pkgname, pattern) == 0) printf(" %s - %s\n", pkgver, desc); + else if (xbps_pkgpattern_match(desc, pattern) == 1) + printf(" %s - %s\n", pkgver, desc); return 0; }