diff options
Diffstat (limited to 'usr.sbin/pkg_install/info/show.c')
-rw-r--r-- | usr.sbin/pkg_install/info/show.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/info/show.c b/usr.sbin/pkg_install/info/show.c index 893e180..a0dae0a 100644 --- a/usr.sbin/pkg_install/info/show.c +++ b/usr.sbin/pkg_install/info/show.c @@ -256,3 +256,18 @@ show_size(char *title, Package *plist) else printf("%lu\n", size); } + +/* Show an "origin" path (usually category/portname) */ +void +show_origin(char *title, Package *plist) +{ + PackingList p; + + if (!Quiet) + printf("%s%s", InfoPrefix, title); + for (p = plist->head; p != NULL; p = p->next) + if (p->type == PLIST_COMMENT && !strncmp(p->name, "ORIGIN:", 7)) { + printf("%s\n", p->name + 7); + break; + } +} |