diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-06 15:28:02 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-06 15:32:13 +0200 |
commit | dde96976d33261a397042405bec28520a57a3451 (patch) | |
tree | 54f3945ed1f91af22910d2ebd70c8d6adcd28a54 /src/search.c | |
parent | a6b28beef055c9c454fba49d02995765e6f3aeab (diff) | |
download | apk-tools-dde96976d33261a397042405bec28520a57a3451.tar.gz apk-tools-dde96976d33261a397042405bec28520a57a3451.tar.bz2 apk-tools-dde96976d33261a397042405bec28520a57a3451.tar.xz apk-tools-dde96976d33261a397042405bec28520a57a3451.zip |
search: improve output format for --rdepends
- makes -v option useful
- makes --origin --quiet --exact useful for piping and scripting
- makes the default output more readable
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c index e90076d..f467eda 100644 --- a/src/search.c +++ b/src/search.c @@ -56,7 +56,9 @@ static void print_rdepends(struct search_ctx *ctx, struct apk_package *pkg) name = pkg->name; - printf(PKG_VER_FMT ":", PKG_VER_PRINTF(pkg)); + if (apk_verbosity > 0) + printf(PKG_VER_FMT " is required by:\n", + PKG_VER_PRINTF(pkg)); for (i = 0; i < name->rdepends->num; i++) { name0 = name->rdepends->item[i]; @@ -65,8 +67,8 @@ static void print_rdepends(struct search_ctx *ctx, struct apk_package *pkg) for (k = 0; k < pkg0->depends->num; k++) { dep = &pkg0->depends->item[k]; if (apk_dep_is_materialized_or_provided(dep, pkg)) { - printf(" "); ctx->print_package(ctx, pkg0); + printf("\n"); } } } |