You are not logged in.

#1 2008-08-25 05:09:19

dkuo1128
Member
Registered: 2008-08-20
Posts: 9

[SOLVED] How do you search the repositories with Pacman for packages?

I'm looking for the pacman equivalent to

 aptitude search <package name>

the backstory (for those interested):
i am trying to install the aurora gtk engine, so I tried

 pacman -S gtk-engine-aurora

modelling after the suggestion in the Beginner's guide to install gtk-engine-murrine after a GNOME install. Pacman found no such package or package group.

Next, I looked at the wiki and at man pacman... and learned that pacman -Q <package name> queries the package database for packages, but (correct me if I'm wrong) I think it only searches the database of installed packages.

Last edited by dkuo1128 (2008-08-25 05:31:38)

Offline

#2 2008-08-25 05:13:00

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] How do you search the repositories with Pacman for packages?

Hit the man pages.

pacman -Ss <package-name>

you can also enter part of the package name. Try a search for just "gtk-engine" or just "gtk-" maybe.

You are correct about the -Q option. It does check only the installed (i.e. the local) packages.

Also, the packages may or may not have the same name as in Ubuntu or Debian or any other distro for that matter.

Last edited by Inxsible (2008-08-25 05:15:24)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2008-08-25 05:16:03

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] How do you search the repositories with Pacman for packages?

i just searched and i got this output

inxs ~ > pacs gtk-engine
extra/gtk-engines 2.14.3-1
    Theme engines for GTK+ 2
extra/gtk1-engines 0.12-1
    Theme-Engines and Themes for GTK+ 1 - including gtk-engines-pixmap
community/gtk-aurora-engine 1.4-1
    gtk-engine: latest member of the clearlooks family
community/gtk-engine-murrine 0.53.1-1
    GTK2 engine to make your desktop look like a 'murrina', an italian word
    meaning the art glass works done by Venicians glass blowers.
inxs ~ >

Last edited by Inxsible (2008-08-25 05:17:10)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2008-08-25 05:30:20

dkuo1128
Member
Registered: 2008-08-20
Posts: 9

Re: [SOLVED] How do you search the repositories with Pacman for packages?

How did you get "pacs" to replace pacman -Ss?

Offline

#5 2008-08-25 05:32:18

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] How do you search the repositories with Pacman for packages?

It will be a bash alias.   In your ~/.bashrc file put:

alias pacs='pacman -Ss'

Offline

#6 2008-08-25 05:51:12

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] How do you search the repositories with Pacman for packages?

my exact alias is like so: It gives me a nice colorized version of different repos

alias pacs="pacsearch"                  # colorize pacman (pacs)
pacsearch () 
{
  echo -e "$(pacman -Ss $@ | sed \
  -e 's#core/.*#\\033[1;31m&\\033[0;37m#g' \
  -e 's#extra/.*#\\033[0;32m&\\033[0;37m#g' \
  -e 's#community/.*#\\033[1;35m&\\033[0;37m#g' \
  -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
}

I copied this from the bashrc thread on this forum itself. I don't rbr who put this out first....but the credit goes to him/her

Last edited by Inxsible (2008-08-25 05:51:53)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2008-08-25 12:43:38

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] How do you search the repositories with Pacman for packages?

Inxsible wrote:

my exact alias is like so: It gives me a nice colorized version of different repos

alias pacs="pacsearch"                  # colorize pacman (pacs)
pacsearch () 
{
  echo -e "$(pacman -Ss $@ | sed \
  -e 's#core/.*#\\033[1;31m&\\033[0;37m#g' \
  -e 's#extra/.*#\\033[0;32m&\\033[0;37m#g' \
  -e 's#community/.*#\\033[1;35m&\\033[0;37m#g' \
  -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
}

I copied this from the bashrc thread on this forum itself. I don't rbr who put this out first....but the credit goes to him/her

It's from the wiki.

Offline

#8 2008-08-25 15:32:05

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: [SOLVED] How do you search the repositories with Pacman for packages?

Inxsible wrote:

my exact alias is like so: It gives me a nice colorized version of different repos

alias pacs="pacsearch"                  # colorize pacman (pacs)
pacsearch () 
{
  echo -e "$(pacman -Ss $@ | sed \
  -e 's#core/.*#\\033[1;31m&\\033[0;37m#g' \
  -e 's#extra/.*#\\033[0;32m&\\033[0;37m#g' \
  -e 's#community/.*#\\033[1;35m&\\033[0;37m#g' \
  -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
}

I copied this from the bashrc thread on this forum itself. I don't rbr who put this out first....but the credit goes to him/her

But you have to wait until the search is finished this way!

Offline

#9 2008-08-26 05:34:57

delor
Member
From: Poland
Registered: 2008-02-02
Posts: 62
Website

Re: [SOLVED] How do you search the repositories with Pacman for packages?

or use pacman-color

Offline

#10 2008-08-26 09:03:38

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED] How do you search the repositories with Pacman for packages?

There is also an advanced version of this pacsearch bash script :
the pacsearch perl script from the pacman-contrib package


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#11 2008-08-26 15:11:52

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] How do you search the repositories with Pacman for packages?

Re: the colorize script having to wait for the search to finish...You can change the:
echo -e "$(pacman ... | sed ...)"
to just:
pacman ... | sed ...
The only thing is you'll need some way to get sed to interpret the escapes (the \033s) as such. One way would be to delete all the '\\033' and replace them with literal escapes (type ctrl-v, then type escape and your shell will insert a literal escape). That's fragile though: if you copy or paste the script your escapes could get turned into the two characters '^' followed by '['. Another way would be to change the sed arguments from this:
-e '...\\033...'
to this:
-e $'...\033...'
or this:
-e $'...\e...'

Offline

Board footer

Powered by FluxBB