1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00
freebsd-ports/ports-mgmt/pkg/files/patch-rquery-I
Bryan Drewery 0d888b0e8a - Fix pkg-rquery -I to have all expected output.
Obtained from:	upstream 29c9c84e0e11c2c182a8d79634344e57bf2575f1
With hat:	portmgr
Reported by:	dteske
2014-07-04 20:08:11 +00:00

44 lines
1.3 KiB
Plaintext

diff --git pkg/rquery.c pkg/rquery.c
index 7ce40f7..f967a34 100644
--- pkg/rquery.c
+++ pkg/rquery.c
@@ -84,13 +84,23 @@ print_index(struct pkg *pkg)
#ifndef PORTSDIR
#define PORTSDIR "/usr/ports"
#endif
- struct pkg_category *cat = NULL;
- pkg_printf("%n-%v|" PORTSDIR "/%o|%p|%c|" PORTSDIR "/%o/pkg-descr|%m|",
- pkg, pkg, pkg, pkg, pkg, pkg, pkg);
- while (pkg_categories(pkg, &cat) == EPKG_OK)
- pkg_printf("%Cn ", cat);
- printf("\n");
+ pkg_printf(
+ "%n-%v|" /* PKGNAME */
+ "%S/%o|" /* PORTDIR */
+ "%p|" /* PREFIX */
+ "%c|" /* COMMENT */
+ "%S/%o/pkg-descr|" /* _DESCR */
+ "%m|" /* MAINTAINER */
+ "%C%{%Cn%| %}|" /* CATEGORIES */
+ "|" /* BUILD_DEPENDS */
+ "%d%{%dn-%dv%| %}|" /* RUN_DEPENDS */
+ "%w|" /* WWW */
+ "|" /* EXTRACT_DEPENDS */
+ "|" /* PATCH_DEPENDS */
+ "\n", /* FETCH_DEPENDS */
+ pkg, pkg, PORTSDIR, pkg, pkg, pkg, PORTSDIR, pkg, pkg, pkg, pkg,
+ pkg);
}
int
@@ -201,7 +211,7 @@ exec_rquery(int argc, char **argv)
return (EX_IOERR);
if (index_output)
- query_flags = PKG_LOAD_BASIC|PKG_LOAD_CATEGORIES;
+ query_flags = PKG_LOAD_BASIC|PKG_LOAD_CATEGORIES|PKG_LOAD_DEPS;
if (match == MATCH_ALL || match == MATCH_CONDITION) {
const char *condition_sql = NULL;