From eb75041b25ac92f36b1cfe5dd08d46f8295d6471 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 31 Jul 2012 10:34:10 +0200 Subject: [PATCH] xbps-repo(8): the search target now shows which pkgs are currently installed. --- NEWS | 3 +++ bin/xbps-repo/show.c | 6 +++++- bin/xbps-repo/xbps-repo.8 | 7 +++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1cf408ee..0e6fe155 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ xbps-0.16.6 (???): + * xbps-repo(8): the 'search' target now shows which packages are currently + installed through the '*' character as prefix in the results. + * xbps-repo(8): a new target has been added: 'remove-obsoletes'. This removes obsolete packages found in a local repository; obsoletes are packages not registered in repository's index. diff --git a/bin/xbps-repo/show.c b/bin/xbps-repo/show.c index 2c5dfcaf..bd84e44b 100644 --- a/bin/xbps-repo/show.c +++ b/bin/xbps-repo/show.c @@ -128,7 +128,11 @@ show_pkg_namedesc(struct xbps_handle *xhp, tmp[x] = ' '; tmp[x] = '\0'; - printf(" %s %s\n", tmp, desc); + if (xbps_pkgdb_get_pkgd_by_pkgver(xhp, pkgver)) + printf(" * "); + else + printf(" "); + printf("%s %s\n", tmp, desc); free(tmp); } } diff --git a/bin/xbps-repo/xbps-repo.8 b/bin/xbps-repo/xbps-repo.8 index 5c8fb1bd..439cd5a2 100644 --- a/bin/xbps-repo/xbps-repo.8 +++ b/bin/xbps-repo/xbps-repo.8 @@ -1,4 +1,4 @@ -.Dd July 22, 2012 +.Dd July 31, 2012 .Os Void GNU/Linux .Dt xbps-repo 8 .Sh NAME @@ -90,7 +90,10 @@ in its or .Em description values in repository pool. Please note that patterns are matched in case -insensitive mode. Multiple patterns can be specified as arguments. +insensitive mode. Multiple patterns can be specified as arguments. Packages that +have the +.Sy * +character as prefix are currently installed. .It Sy remove-obsoletes Ar /path/to/local/repository Removes obsolete packages from .Ar repository .