You are not logged in.
First and foremost, I really don't want to start any sort of Gentoo vs. Arch war--it is not my intention at all. I also don't want to start another "pacman needs color!" thread.
I do, however, want to acknowledge that different users have different desires. For some, pacman is perfect. For others, it'd be nice to have colored output and different output formats to make the search results more readable, especially if there are a lot of results. I originally wrote the pak script to remedy such things, but I think that it lacks in a lot of respects.
I have just finished writing psearch, a python script that allows Arch users to do some of the same things that esearch lets Gentoo users do. Some of the features are:
- Gives color output if you want it (you can turn it off if you don't)
- Can do a verbose search with a lot of package information, or a compact one that uses only one line per package (helpful if there are a lot of results)
- Searches AUR if you want.
- Allows a strict search. Pacman matches package names and descriptions for results. Psearch allows you to search package names only if you so desire.
- Search only a single repository, not all of them.
- Only search for packages that are installed
- Only search for packages that are not installed
- Only search for packages that are installed and a newer version is available.
- Reverse search results (again, helpful if there are a lot of results. This will show the first results last and the last results first).
- Omit a string. Ever do a search for KDE and get the 50+ localization packages in your results? You can omit those from the results.
- Using the --info argument, psearch will display the current version of pacman, the size of the pacman cache on your hard drive, and all repository names, number of available packages, and last update.
- Not happy with pacman's output format or the default psearch output format? Or you like pacman's output but wish it'd show the installed version? Use the --format argument and define your own output.
As you can see, there is a lot you can do to manipulate and/or refine a pacman search using psearch. I hope you can make use of it. You can find it in AUR hereif you'd like to give it a try.
Last edited by wrythe (2007-05-26 22:37:52)
psearch - manipulate and refine pacman searches
Offline
Can psearch do search with two or more words?
to search kde cd/dvd burning software:
$ psearch kde burn
Or is there any other package search that can do this? Omit is useful, but I would like to search two or more matches per package.
Offline
Can psearch do search with two or more words?
to search kde cd/dvd burning software:
$ psearch kde burnOr is there any other package search that can do this? Omit is useful, but I would like to search two or more matches per package.
That's a good idea. I can see if I can implement it. You can, however, just grep the results (I used to do it in Gentoo a lot with esearch). You have to use the compact output though.
psearch -c kde | grep -i burn
psearch - manipulate and refine pacman searches
Offline
Can psearch do search with two or more words?
OK, I didn't think it would be too difficult, so I started toying with it right away (like I said before, it's a good idea). It appears to be working, though I haven't given it a lot of testing. There is a new version in AUR now that will let you search as many keywords as you want.
psearch keyword1 keyword2 keyword3 keyword4 # etc...
psearch - manipulate and refine pacman searches
Offline
Sweet, have to test it and big thanks
Offline
Thanks for this application : I was just switching from gentoo to arch and psearch is always welcomed
Is it possible to also include the homepage of the applications like in esearch ?
There are a lot of lies going around.... and half of them are true.
-- Winston Churchill
Offline
Thanks for this application : I was just switching from gentoo to arch and psearch is always welcomed
![]()
Is it possible to also include the homepage of the applications like in esearch ?
Thanks, I'm glad you're enjoying it Pacman only stores package URLs for installed packages, so there is no way for psearch to display the URL for all packages. It's something that I wanted to include, but I haven't found a way around it yet.
psearch - manipulate and refine pacman searches
Offline
An upgrade of psearch is now available in AUR. It now displays "local" packages (packages not associated with any defined repository), displays single package information (like pacman -Qi), and file owner information (like pacman -Qo). The package information is basically a colored version of what is displayed by doing a regular pacman -Qi; However, the file owner information is more verbose than a pacman -Qo.
For example,
# pacman -Qo /usr/bin/pacman
/usr/bin/pacman is owned by pacman 2.9.8-4
# psearch --owns /usr/bin/pacman
> /usr/bin/pacman is owned by:
Package name : pacman
Package version : 2.9.8-4
Packaged by : Tobias Powalowski <tpowa>
Homepage : http://www.archlinux.org/pacman
License : None
Architecture : i686
Installed size : 1.0 MB
Build date : Sun Dec 31 09:05:08 2006
Install date : Mon Jan 1 15:27:41 2007
Reason installed : Explicity installed
Provides : None
Dependencies : None
Required by : None
Conflicts with : None
Description : A .tar.gz based package manager with dependency support
Please let me know if there are any bugs in these new features or if you have any recommendations for new features or modifications.
psearch - manipulate and refine pacman searches
Offline
Nice tool, wrythe.
Offline
Thanks, this is very useful especially when searching from AUR.
Offline
Just fixed a bug that showed 'local' packages when using the --rep flag (oops, how embarassing )
Thanks again everyone for your feedback and support. Please don't hesitate to contact me or post here if you have any further bug encounters or suggestions.
psearch - manipulate and refine pacman searches
Offline
A few bug fixes concerning the --strict argument have been fixed (see AUR comment page for details). The use of ^ and $ in searches is now also supported.
P.S. Up to 16 votes! Thanks guys
psearch - manipulate and refine pacman searches
Offline
Thank you for this tool! And keep up your great work!
Offline
New build up in AUR
+ Fixed the PKGBUILD with the rest of Snowman's recommendations (thank you!). Also added 'pacman=2.9.8' as a dependency since the dev version of pacman3 is floating around.
+ Changed all 'white' colors to 'bold' in hopes of not interfering with users that use a light background in their terminal.
+ Added argument -X (--boldonly) to display no colors, but to keep bolded text (a feature request I saw for yaourt that I thought would be good to implement.)
+ Fixed a quirk with AUR searches that caused psearch to crap out if an AUR package had a funky version (this would specifically happen when searching key term 'beryl')
+ Cleaned up the code a bit. I've learned a thing or two more about Python since I first wrote this
psearch - manipulate and refine pacman searches
Offline
Great work
http://galeria.firlej.org
Voiceless it cries,Wingless flutters,Toothless bites,Mouthless mutters.
http://grizz.pl
Offline
I removed the pacman version dependency from the PKGBUILD. I have tested it with pacman3 and it works fine. The only problem you may experience is extraneous results when using the --strict option since group names are printed alongside package name and version.
psearch - manipulate and refine pacman searches
Offline
+ Adapted psearch to pacman3. If a package belongs to a group, pacman3 will display the group name next to the package name; this caused some extraneous results when doing a "strict" search with psearch.
+ Changed some of the bold output to regular output (it just seemed like it was too much)
+ Changed the way package information is looked up and used using the "-p" argument.
psearch - manipulate and refine pacman searches
Offline
psearch has been completely rewritten. AUR searches are now performed using python modules, not wget. Searches are also done by accessing pacman's database directly. This means that no `pacman` command is performed whatsoever. Results can be a little faster or slower at times because of this, but the speed difference is negligible either way. The biggest speed difference is AUR searches -- much faster now.
+ --listfiles command added (like pacman -Ql <package>)
+ --allpackages command added (like pacman -Sl <repository>)
+ --group command added (like pacman -Sg <group>)
Please let me know if you run into any bugs. Seeing as this is a very new and fresh version, I'm sure there are some lurking out there somewhere.
psearch - manipulate and refine pacman searches
Offline
Another pretty big update. Psearch is now a Python module with a supplementary script. This means that you can either create your own script and let the module do the dirty work, or continue to use the psearch script itself.
psearch - manipulate and refine pacman searches
Offline
Hi!
Thanks, I'm glad you're enjoying it
Pacman only stores package URLs for installed packages, so there is no way for psearch to display the URL for all packages. It's something that I wanted to include, but I haven't found a way around it yet.
2nd day with Arch (after 5 years with Gentoo) and I'm already enjoying psearch
However, I'd also like to see URL, but I do not find a way to get it even for installed packages
Do I miss something?
Sincerely,
Gour
Offline
Hi!
wrythe wrote:Thanks, I'm glad you're enjoying it
Pacman only stores package URLs for installed packages, so there is no way for psearch to display the URL for all packages. It's something that I wanted to include, but I haven't found a way around it yet.
2nd day with Arch (after 5 years with Gentoo) and I'm already enjoying psearch
However, I'd also like to see URL, but I do not find a way to get it even for installed packages
Do I miss something?
Sincerely,
Gour
Sorry for the super late reply. I've been kind of out of the loop lately. Anyway, since I couldn't get the URL to work with all packages I just decided to leave the feature out. Maybe I'll add it for installed packages in the next update. The psearch module will pull the URL for installed packages, so if you want to make your own script then that information is available, I just haven't incorporated it in the default script.
psearch - manipulate and refine pacman searches
Offline
Sorry for the super late reply. I've been kind of out of the loop lately. Anyway, since I couldn't get the URL to work with all packages I just decided to leave the feature out. Maybe I'll add it for installed packages in the next update. The psearch module will pull the URL for installed packages, so if you want to make your own script then that information is available, I just haven't incorporated it in the default script.
Thank you for reply.
Yes, I'd like to see that feature in psearch, at least for installed packages - it reminds me on the old days spent with eix & Gentoo
Sincerely,
Gour
Offline
Wow! This is a very useful tool for me, thanks a lot!
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
Yes, I'd like to see that feature in psearch, at least for installed packages - it reminds me on the old days spent with eix & Gentoo
Just updated it. URLs are now displayed for installed packages.
psearch - manipulate and refine pacman searches
Offline
Just updated it. URLs are now displayed for installed packages.
Thanks a lot
Did I miss AUR feed or it was not announced?
Sincerely,
Gour
Offline