xbps-repo: search target: also report exact matches by pkgname.
--HG-- extra : convert_revision : xtraeme%40gmail.com-20100114000654-tnrtvi1ymy2iveyx
This commit is contained in:
parent
15be7b43a4
commit
6c29fe7514
@ -179,7 +179,7 @@ show_pkg_files(prop_dictionary_t filesd)
|
|||||||
int
|
int
|
||||||
show_pkg_namedesc(prop_object_t obj, void *arg, bool *loop_done)
|
show_pkg_namedesc(prop_object_t obj, void *arg, bool *loop_done)
|
||||||
{
|
{
|
||||||
const char *pkgver, *desc;
|
const char *pkgver, *pkgname, *desc;
|
||||||
char *pattern = arg;
|
char *pattern = arg;
|
||||||
|
|
||||||
(void)loop_done;
|
(void)loop_done;
|
||||||
@ -187,11 +187,14 @@ show_pkg_namedesc(prop_object_t obj, void *arg, bool *loop_done)
|
|||||||
assert(prop_object_type(obj) == PROP_TYPE_DICTIONARY);
|
assert(prop_object_type(obj) == PROP_TYPE_DICTIONARY);
|
||||||
assert(pattern != NULL);
|
assert(pattern != NULL);
|
||||||
|
|
||||||
|
prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
|
prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "short_desc", &desc);
|
prop_dictionary_get_cstring_nocopy(obj, "short_desc", &desc);
|
||||||
|
|
||||||
if (xbps_pkgdep_match(pkgver, pattern) == 1)
|
if (xbps_pkgdep_match(pkgver, pattern) == 1)
|
||||||
printf(" %s - %s\n", pkgver, desc);
|
printf(" %s - %s\n", pkgver, desc);
|
||||||
|
else if (strcmp(pkgname, pattern) == 0)
|
||||||
|
printf(" %s - %s\n", pkgver, desc);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user