Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to install program foo using emerge on a Gentoo system; so I simply use emerge foo to install and portage selects the most current version of that software that's in its repository. If I know the version number and the naming covnention, I can do emerge =foo.1.2 and use eselect to chose what the currently inforce package is out of the installed ones, if the package supports it.

But what if I don't know the version number or naming convention and just want a list of what's versions of foo are available to me? I don't see an emerge option that does this and snooping around under /usr/portage doesn't yield me anything.

Bonus: Is there anyway to find what locations emerge polls to determine what packages are available? For example, many of the ebuilds on my systems are in nonstandard locations, but emerge finds them anyway, so I'm attempting to determine how emerge builds it's list of available software versions.

share|improve this question

migrated from serverfault.com Apr 3 at 16:48

This question came from our site for professional system and network administrators.

    
Maybe emerge --info =foo* or with --search instead or something like that from the atom syntax? –  Amphiteóth May 30 at 1:37
    
You need to read up on man portage Look for the PORTDIR Variable. The location of your Portage Tree is determined by the setting of that variable As a shortcut try ls ${PORTDIR} –  eyoung100 Dec 3 at 18:16

3 Answers 3

Another way would be to list available keywords with equery, this will also show the versions available.

$ [-] equery y pidgin
Keywords for net-im/pidgin:
             |                             | u   |  
             | a a   a           p     s   | n   |  
             | l m   r h i m m   p s   p   | u s | r
             | p d a m p a 6 i p c 3   a x | s l | e
             | h 6 r 6 p 6 8 p p 6 9 s r 8 | e o | p
             | a 4 m 4 a 4 k s c 4 0 h c 6 | d t | o
-------------+-----------------------------+-----+-------
   2.10.9    | + + + o ~ + o o + + o o + + | o 0 | gentoo
[I]2.10.9-r1 | ~ + ~ o + ~ o o + ~ o o ~ + | o   | gentoo
share|improve this answer

I would've expected emerge --search to provide this functionality, alas it only seems to show latest version.

$ [-] emerge --search eix
Searching...    
[ Results for search key : eix ]
[ Applications found : 1 ]

*  app-portage/eix
      Latest version available: 0.29.3
      Latest version installed: 0.29.3
      Size of files: 536 kB
      Homepage:      http://eix.berlios.de
      Description:   Search and query ebuilds, portage incl. local settings, ext. overlays, version changes, and more
      License:       GPL-2

So to answer your question: I've been using eix for so long, I don't really remember what I did before.

$ [-] eix eix$ -c
[I] app-portage/eix
     Available versions:  0.25.5{tbz2} 0.29.3{tbz2} ~0.29.6 ~0.30.0 ~0.30.1 {clang debug +dep doc nls optimization security sqlite strong-optimization strong-security swap-remote tools zsh-completion LINGUAS="de ru"}
     Installed versions:  0.29.3{tbz2}(10:44:38 07.09.2013)(dep nls -clang -debug -doc -optimization -security -sqlite -strong-optimization -strong-security -swap-remote -tools -zsh-completion LINGUAS="-de -ru")
     Homepage:            http://eix.berlios.de
     Description:         Search and query ebuilds, portage incl. local settings, ext. overlays, version changes, and more
share|improve this answer
    
I absolutely will second eix as the Goto Tool. +1 –  eyoung100 Dec 3 at 18:18

While I would recommend lkraav's solution, here is another way:

$ ls /usr/portage/app-portage/eix/
ChangeLog  eix-0.25.5.ebuild  eix-0.29.6.ebuild  eix-0.30.1.ebuild
Manifest   eix-0.29.3.ebuild  eix-0.30.0.ebuild  metadata.xml

this will of course only give you list of all ebuilds available for eix in the portage tree (without all the nice info which eix does provide). If you are using layman more ebuilds will be available in overlays (basically in other folders).

share|improve this answer
    
ls -1 perhaps gives a better one-column view for this. –  lkraav Dec 3 at 22:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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