I am trying to set up riak on Debian wheezy. I've followed their instructions to add the basho apt repositories...

$> curl http://apt.basho.com/gpg/basho.apt.key | sudo apt-key add -
$> sudo bash -c "echo deb http://apt.basho.com $(lsb_release -sc) main > /etc/apt/sources.list.d/basho.list"

... and performed apt-get update:

Hit http://apt.basho.com wheezy Release.gpg
Hit http://apt.basho.com wheezy Release
Hit http://apt.basho.com wheezy/main i386 Packages
Ign http://apt.basho.com wheezy/main Translation-en_US
Ign http://apt.basho.com wheezy/main Translation-en

However apt still says there's no such package:

$> apt-get install riak
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package riak

I suspect their instructions might be out of date, having an old package name. How can I query the basho apt repositories to see what packages it holds? I think that if I saw the list of packages, I could see which one it was that I wanted.

  • Note also that an apt repos that is served via http is just a bunch of static data. You can just go in and poke around using a web browser. – Faheem Mitha Mar 9 '14 at 23:16

You can use aptitude to check which packages provides an specific site:

aptitude search '?origin(Unofficial Multimedia Packages)'
p   2mandvd                         - Video DVD creator                         
p   2mandvd:amd64                   - Video DVD creator                         
p   2mandvd-data                    - Video DVD creator (data files)            
p   aac-enc                         - Fraunhofer FDK AAC Codec Library - fronten
p   aac-enc:amd64                   - Fraunhofer FDK AAC Codec Library - fronten
p   aacgain                         - Lossless mp4 normalizer with statistical a
p   aacgain:amd64                   - Lossless mp4 normalizer with statistical a
p   aacplusenc                      - High-Efficency AAC (AAC+) Encoder.        
p   aacplusenc:amd64                - High-Efficency AAC (AAC+) Encoder.        
p   aacskeys                        - Decrypt all required keys from an AACS pro
p   aacskeys:amd64                  - Decrypt all required keys from an AACS pro
p   acroread                        - Adobe Acrobat Reader: Portable Document Fo
p   acroread-data                   - data files for acroread                   
p   acroread-debian-files           - Debian specific parts of Adobe Acrobat Rea
p   acroread-debian-files:amd64     - Debian specific parts of Adobe Acrobat Rea
p   acroread-dictionary-en          - English dictionary for for acroread       
p   acroread-escript                - Adobe EScript Plug-In                     
p   acroread-fonts-jpn              - Japanese fonts for Adobe acrobat reader 

Or worse, you could just parse the package list directly:

grep Package /var/lib/apt/lists/ftp.deb-multimedia.org_dists_jessie_main_binary-i386_Packages 
Package: 2mandvd
Package: 2mandvd-data
Package: aac-enc
Package: aacgain
Package: aacplusenc
Package: aacskeys
Package: acroread-debian-files
Package: acroread-fonts-jpn
Package: advancemenu
Package: aften

apt-cache is the program to use. You could do:

apt-cache search riak

to search everything and:

apt-cache --names-only search riak

to search only package names.

You can also limit apt activities to a single .list file using the Dir::Etc::sourcelist and Dir::Etc::sourceparts options. This should work with any apt command. Eg:

apt-cache -o Dir::Etc::sourcelist="/etc/apt/sources.list.d/basho.list" \
  -o Dir::Etc::sourceparts=/dev/null
  search raik

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.