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 two (or more) versions of the same packages on my Gentoo system. I know for sure there won't be any file clash, since there very few files installed and each of them is named after the version.

I know about slots, but these are specified in the ebuild files, and let's assume I don't want to edit any ebuild file for several reasons.

I would like the installed versions to be part of the world package, so they can be reinstalled or uninstalled as usual.

Is there a way to install multiple versions of the same package? Do you know of some Portage tricks to achieve that?

share|improve this question
    
That's what slots are for. If the package is not slotted then the only thing I can think of is to create a personal overlay and a new package/ebuild that is slotted. –  Keith May 2 '11 at 1:11
    
@Keith - That's the right answer, why not post it as an answer? –  HedgeMage May 2 '11 at 2:07
    
@Keith: If it's indeed the only way to do it, then post it as an answer and I will gladly accept it. –  Laurent Pireyn May 2 '11 at 10:56
add comment

3 Answers

up vote 8 down vote accepted

That's what slots are for. If the package is not slotted then the only thing I can think of is to create a personal overlay and a new package/ebuild that is slotted.

share|improve this answer
1  
A little hint towards a pragmatical way to use slots would help newbies :) –  Stefano Apr 13 '13 at 14:20
add comment

I think in theory you could do something silly like:

$ ROOT=~/package-1.0 emerge =package-1

But basically all non-overlay stuff is highly subject to some additional limitations and requirements about which there is not that much information.

share|improve this answer
add comment

What you might try (I'm not sure if it works as expected) is to use /etc/portage/env to set the SLOT of particular package versions. It might not work because of metadata caching though. Even if it does work this is a cludge and may result in unexpected behaviour. As always, if it breaks, you get to keep the pieces.

share|improve this answer
add comment

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.