[pacman-dev] [PATCH] Feedback from installed package while searching
Nagy Gabor
ngaba at bibl.u-szeged.hu
Fri Sep 4 04:58:37 EDT 2009
2009. 09. 4, péntek keltezéssel 09.09-kor Allan McRae ezt írta:
> Xavier wrote:
> > On Thu, Sep 3, 2009 at 9:18 PM, <djszapi2 at gmail.com> wrote:
> >
> >> From: Laszlo Papp <djszapi2 at gmail.com>
> >>
> >> 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: Laszlo Papp <djszapi2 at gmail.com>
> >> ---
> >> 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
> >>
> >>
> >>
> >>
> >
> > stopped using root account, heh ?
> >
> > I submitted a similar patch 1 year and a half ago, but it was never accepted :
> > http://www.mail-archive.com/pacman-dev@archlinux.org/msg00109.html
> >
> > So I am afraid you are stuck with yaourt / pacsearch / any other
> > pacman wrapper to get that feature.
> >
>
> Well... this is nothing if not persistent given Laslo had a bug report
> closed as "Won't Implement" for this feature request...
>
> So lets take a step back and see why this feature was dismissed. As far
> as I can tell, it was rejected because it is slower as we need to parse
> the local db as well as the sync db - of course only applies before the
> local db is cached.
>
However, this is very cheap localdb parsing here, because we need
package name and version only, so there is no need to read any local
depend/desc/... files.
More information about the pacman-dev
mailing list