[pacman-dev] [PATCH] Feedback from installed packages while searching
From: root <root@djszapi.localdomain> To get feedback while searching instead of using another utility for this purpose, whether the desired packages are installed. You can see example for it in case of yaourt. Signed-off-by: root <root@djszapi.localdomain> --- src/pacman/sync.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/pacman/sync.c b/src/pacman/sync.c index dc93621..9935d6d 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -330,6 +330,10 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) printf(")"); } + if (alpm_db_get_pkg(db_local, alpm_pkg_get_name(pkg))) { + printf(" [%s]", _("installed")); + } + /* we need a newline and initial indent first */ printf("\n "); indentprint(alpm_pkg_get_desc(pkg), 4); -- 1.6.4.1
On Thursday, September 3, 2009, Laszlo Papp <djszapi2@gmail.com> wrote:
From: root <root@djszapi.localdomain>
To get feedback while searching instead of using another utility for this purpose, whether the desired packages are installed. You can see example for it in case of yaourt.
Signed-off-by: root <root@djszapi.localdomain> --- Did you look at pacsearch in pacman-contrib?
-Dan
src/pacman/sync.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index dc93621..9935d6d 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -330,6 +330,10 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) printf(")"); }
+ if (alpm_db_get_pkg(db_local, alpm_pkg_get_name(pkg))) { + printf(" [%s]", _("installed")); + } + /* we need a newline and initial indent first */ printf("\n "); indentprint(alpm_pkg_get_desc(pkg), 4); -- 1.6.4.1
On Thursday, September 3, 2009, Laszlo Papp <djszapi2@gmail.com> wrote:
From: root <root@djszapi.localdomain>
To get feedback while searching instead of using another utility for this purpose, whether the desired packages are installed. You can see example for it in case of yaourt.
Signed-off-by: root <root@djszapi.localdomain> --- Did you look at pacsearch in pacman-contrib?
-Dan
We have dozens of scripts floating around, and many of them is simply third-party/unsupported. (I can't and don't want to follow them.) I think if a feature is useful, we should implement it, if it doesn't, we should not, so if pacsearch is cool, pacman should support its features. We are tending to "one script for one feature" which is odd imho, sorry. I should have changed the subject, because this is not closely related to the actual patch, this is about (third-party or official) scripts. Bye
participants (3)
-
Dan McGee
-
Laszlo Papp
-
Nagy Gabor