On Saturday 15 March 2008, Neil Bothwick wrote: > On Sat, 15 Mar 2008 12:13:05 -0400, Chuck Robey wrote: > > I haven't been able to find any syntax to actually use slots, > > In general, you don't. Slots are mainly used for libraries and > similar programs that are used by other programs. One program needs > libfoo 1.x,another needs libfoo 2.x. Slots enable you to have both > installed and both programs are happy. > > There are a few slotted packages where a user decides which version > they want, but this is done is the same way as specifying the version > for non-slotted packages, by specifying the version in the emerge > command.
Just to expand on that a little (the info IS all in the various man pages, but it's not really laid out in a tutorial style so that people seeing it for the first time can wrap their brains around it): As Neil says, SLOTs let you have two or more versions of the same thing so they co-exist. Usually, SLOTS are named after the major version number of the package, but not always. Take these two examples, using eix (with extra stuff like dates and USE flags snipped out): [I] x11-libs/qt Available versions: (3) 3.3.4-r8 3.3.8-r4 (4) 4.3.2-r1 (~)4.3.3 (~)4.3.4 [M](~)4.4.0_beta1 Installed versions: 3.3.8-r4(3) 4.3.4(4) This says in the "Available" section that there are two SLOTs for qt - 3 and 4 - and there are several versions available in both branches. On my box, I have qt-3.3.8-r4 installed in the qt:3 SLOT and qt-4.3.2.-r1 in the qt:4 SLOT. So far so good. Now look at kde: * kde-base/kde-meta Available versions: (3.5) 3.5.8 (~)3.5.9 (kde-4) {M}(~)4.0.1 {M}(~)4.0.2 This one is different, the SLOTs are called "3.5" and "kde-4", and I don't have the full kde range installed for either. I find that eix's output is the easiest way to determine which SLOTs are defined, the colourized output lays it out quite nicely. Portage handles SLOT updates by only considering the latest SLOT (unless you say otherwise). If I issue 'emerge kde-meta' on my box, portage wants to install kde-4.0.2 because that is the latest version (portage always wants to upgrade to the latest possible version even without SLOTs being involved). To update an earlier SLOT I have to use a minor syntax tweak: emerge kde-meta:3.5 The ":" is the signal to look for a SLOT. Portage will update to the highest version in the 3.5 SLOT which happens to be 3.5.9 for me. (Aside: all we need do now is hope and pray that no package ever gets a : in it's name ... ) Quite obviously, in my case the following two commands are identical: emerge kde-meta emerge kde-meta:kde-4 In summary, the SLOT syntax is just a sensible extension of how portage deals with ranges of versions. Compare these and it all makes sense: emerge foo emerge >foo-1.0.0 emerge <=foo-2.3.4 emerge foo:1 emerge foo:2 Hope all this helps and it now makes a little more sense :-) -- Alan McKinnon alan dot mckinnon at gmail dot com -- gentoo-user@lists.gentoo.org mailing list