diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-05-04 14:49:49 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-05-04 14:49:49 +0000 |
commit | 7af7b2eda9f1aa29b39f4888c6d57a93e2896346 (patch) | |
tree | 88c2e0739e3b1ea436c61ad76259b151f4352d1f /usr.sbin/pkg_install/info/show.c | |
parent | 430e2d77019f398e388e9cdb817a5400dba26c7a (diff) | |
download | FreeBSD-src-7af7b2eda9f1aa29b39f4888c6d57a93e2896346.zip FreeBSD-src-7af7b2eda9f1aa29b39f4888c6d57a93e2896346.tar.gz |
Add ability to query installed packages based on origin.
Diffstat (limited to 'usr.sbin/pkg_install/info/show.c')
-rw-r--r-- | usr.sbin/pkg_install/info/show.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/info/show.c b/usr.sbin/pkg_install/info/show.c index 95550d1a..7421fbd 100644 --- a/usr.sbin/pkg_install/info/show.c +++ b/usr.sbin/pkg_install/info/show.c @@ -312,21 +312,17 @@ show_cksum(const char *title, Package *plist) void show_origin(const 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; - } + printf("%s\n", plist->origin != NULL ? plist->origin : ""); } /* Show revision number of the packing list */ void show_fmtrev(const char *title, Package *plist) { + if (!Quiet) printf("%s%s", InfoPrefix, title); printf("%d.%d\n", plist->fmtver_maj, plist->fmtver_mnr); |