oshazard / apacman

ArchLinux User Repository (AUR) helper and pacman wrapper
https://aur.archlinux.org/packages/apacman/
GNU General Public License v3.0
70 stars 11 forks source link

FEATURE: display [installed] when using -Ss #16

Closed senorsmile closed 9 years ago

senorsmile commented 9 years ago

when using pacman -Ss, pacman will display [installed] next to packages that are already installed. It would be nice if apacman did this for aur packages.

oshazard commented 9 years ago

I agree that this should be included, although I'm not sure how to implement it without a major performance hit during searches. Also, these bugs/requests keep piling up but I've been unable to find the time to work on them.

senorsmile commented 9 years ago

I see that yaourt does it, and it "seems" to not take too bad of a performance hit. I'll look through their source and see what I can keep up with for a PR.

Once again, thanks for maintaining the best fork of the best aur helper.

oshazard commented 9 years ago

Added in version 1.6 (c72bd99d475f49b4146eb53c3e0a67e6b8791b1c)

Took some experimentation to get it optimized but it's within an acceptable margin now...

Example of locally installed package newer than in AUR:

aur/apacman 1.5-1 [local: 1.6-1] (15)
    AUR wrapper forked from packer

Example of package out-of-date with AUR:

aur/apacman 1.6-1 [installed: 1.5-1] (15)
    AUR wrapper forked from packer

Example of package up-to-date with AUR:

aur/apacman 1.6-1 [installed] (15)
    AUR wrapper forked from packer