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
This commit is contained in:
Juan RP 2010-04-28 23:46:59 +02:00
parent 40ae71d195
commit 2d68c5fb20
2 changed files with 5 additions and 0 deletions

3
NEWS
View File

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

View File

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