You are not logged in.
Maybe I've miss something but when I pacman -Ss sth
I have a list of package related to this sth but it would be nice to know if it's already installed
Also yaourt include this feature already
Last edited by ChoK (2008-10-25 20:46:58)
Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry
Offline
I don't think pacman can do that but since the feature you're referring to is already available in yaourt, maybe it's best if you just use that.
Offline
I think this might accomplish that, but it's really, really crude. It was just the first thing that came to mind, so I'm sure there are more elegant ways of doing it.
pacman -Q $(pacman -Ss sth | grep '\/.*-' | awk '{print $1}' | sed -e 's|.*/||')
Of course, now it will probably be revealed that you can just do it with pacman -Xyz or some such
... and yes, turns out it's as simple as grabbing the pacman-contrib package
Last edited by creslin (2008-10-26 16:23:02)
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
Even if it is possible with yaourt, it's very KISS to have it in pacman
and loading package from aur is long when I actually don't want to see them (4 seconds loading + 1 second browsing through and getting to the interessant part ... yeah I'm lazy xD)
@creslin you're right it's ugly, but it has some charm as well (add some 1337 output converter and show off
Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry
Offline
Even if it is possible with yaourt, it's very KISS to have it in pacman
I think you misunderstand what KISS means for Arch -- it is not about simplicity in the sense of ease/convenience for the end user, but about simplicity in the sense of the quality of the design. Why add marginally useful functionalities to pacman directly when they can be easily realized with wrapper scripts? Pacman is a KISS package manager because it doesn't try to do more than it needs to.
Offline
and loading package from aur is long when I actually don't want to see them (4 seconds loading + 1 second browsing through and getting to the interessant part ... yeah I'm lazy xD)
Well, to get around that you can use a "dirty" trick like setting http_proxy to something invalid like:
http_proxy=meow yaourt -Ss foo
@fwojciec: Well said.
Offline
Or you can install "pacman-contrib" which are the contributed scripts distributed with the pacman sources. Then run "pacsearch <package>"
Offline
I reread the Arch way, you are right
well I'll just stick with yaourt.
Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry
Offline
Tupac (in the AUR) is a very fast yaourt wrapper, so you can get the results you want, even faster than using plain pacman.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Tupac (in the AUR) is a very fast yaourt wrapper, so you can get the results you want, even faster than using plain pacman.
I just missed something... how can a wrapper around a wrapper around pacman be faster than pacman?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
finferflu wrote:Tupac (in the AUR) is a very fast yaourt wrapper, so you can get the results you want, even faster than using plain pacman.
I just missed something... how can a wrapper around a wrapper around pacman be faster than pacman?
it uses its own database, but uses yaourt to install packages.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Lol, and I have yaourt already wrapping powerpill. Sometimes speedy and bloaty make for a happy couple
If someone know the traduction of the french expression "usine à gaz" maybe gasworks
Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry
Offline
Here's a script that you can use to search the repos and see which of the results you already have installed:
#!/usr/bin/python
import sys
import os
import re
# colors
CURRENT_VERSION="\x1B[0;32m" # used if installed version is the current version
OLDER_VERSION="\x1B[0;36m" # used if installed version is an older version
RESET="\x1B[0;39m" # the default color
def get_args():
if len(sys.argv) > 1:
return ' '+' '.join(sys.argv[1:])
else:
return ''
local_pkgs = {}
local_regex = re.compile('(\S+)\s+(\S+)\s*(?:\n|$)')
local_list = os.popen('pacman -Q').read().rstrip()
for match in local_regex.findall(local_list):
(pkg,ver) = match
local_pkgs[pkg] = ver
search_regex = re.compile('((\S*?/)(\S+)\s+(\S+)(.*?)\n(\s+.*?)(?:\n|$))')
search_list = os.popen('pacman -Ss'+get_args()).read().rstrip()
for match in search_regex.findall(search_list):
(full,repo,pkg,ver,group,desc) = match
if local_pkgs.has_key(pkg):
if ver == local_pkgs[pkg]:
print "%s%s%s %s%s\n%s" % (CURRENT_VERSION,repo,pkg,ver,RESET,desc)
else:
print "%s%s%s %s%s\n%s" % (OLDER_VERSION,repo,pkg,ver,RESET,desc)
else:
print full.rstrip()
Just pass it the search term that you would pass pacman. I've added 4 comments at the top to make it clear how to change the output colors if you want.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline