Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93469 - SLOT dependencies
Summary: SLOT dependencies
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Other
: High enhancement (vote)
Assignee: Portage team
Keywords: InVCS
: 143111 (view as bug list)
Depends on:
Blocks: 155723 4698 147007
  Show dependency tree
Reported: 2005-05-21 13:38 UTC by Jan Brinkmann (RETIRED)
Modified: 2006-11-19 14:48 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Brinkmann (RETIRED) gentoo-dev 2005-05-21 13:38:58 UTC
Imho, it would makes things sometimes easier if it would be possible to depend directly on slots instead of package versions. we make often use of the slotting idea for java packages since the java programmers tend to break their api even in minor version bumps. sometimes there are versions which are fully api compatible, which should be in the same slot, like version 1 and version 2. for such a situation it would be nice if it would be possible to add a depend/rdepend like: 

DEPEND="%foobar-1" , where 1 means slot 1. the '%' is just an idea for an token that could be used to indicate that we depend on a slot instead of the package version. java-config already supports something like that for getting the classpath of installed packages, like 'java-config --classpath=xerces-2' where xerces is the package name an 2 the slot. what do you think?
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-05-21 17:14:43 UTC
The syntax that has been thrown about for a while is cat/pkg:slot. However  
dynamic slots will also be required. Still trying to figure out if it's even  
possible for the ability to dynamically depend on a dynamic slot is possible. 
So.. That's a "maybe". 
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2005-07-28 07:24:46 UTC
Putting a hold on feature requests for portage as they are drowning out the 
bugs. Most of these features should be available in the next major version of 
portage. But for the time being, they are just drowning out the major bugs and 
delaying the next version's progress. 
Any bugs that contain patches and any bugs for etc-update or dispatch-conf can 
be reopened. Sorry, I'm just not good enough with bugzilla. ;) 
Comment 3 Zac Medico gentoo-dev 2006-08-02 11:19:47 UTC
USE based slots for chost and such would certainly be nice too though (so that, for example, crossdev wouldn't have to do it's package name mangling trick).  If anyone needs a primer on various types of slots, I've found this email useful:

Maybe we should just focus on static slots for now, since that's all that portage currently supports anyway? Paludis apparently supports cat/pkg:slot::repo[use] syntax.
Comment 4 Josh Nichols (RETIRED) gentoo-dev 2006-08-02 11:30:28 UTC
Adding java@g.o since we love using SLOTs :)
Comment 5 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-08-03 12:12:11 UTC
Interested in this as it could be a better/alternate solution to ranged dependencies (bug 4315)
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-05 14:51:56 UTC
I think it would be nice if there was a way to fine-tune wanted version inside the slot, like >=cat/foo-1.2.1-r2:1.2 in case -r2 fixes something the depending package needs to build against it.
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2006-08-07 12:05:38 UTC
*** Bug 143111 has been marked as a duplicate of this bug. ***
Comment 8 Zac Medico gentoo-dev 2006-10-04 23:01:19 UTC
In svn r4594 I have added support for slot based dep matching in all dbapi derived classes.  The supported syntax is ${CATEGORY}/${PN}:${SLOT} (identical to that used by paludis and pkgcore).  It may still be necessary to add support in some other areas such as the best_match_to_list function and the global updates code (config files, slot moves, etc...).  The existing support is enough to allow one to use slot based deps on the emerge command line.  It's also enough to allow me to fix bug 4698 with a little work.
Comment 9 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-10-04 23:38:44 UTC
So it's not possible what comment 6 suggests?
Comment 10 Zac Medico gentoo-dev 2006-10-04 23:55:23 UTC
(In reply to comment #6)
> I think it would be nice if there was a way to fine-tune wanted version inside
> the slot, like >=cat/foo-1.2.1-r2:1.2 in case -r2 fixes something the depending
> package needs to build against it.

That would be significantly more work to implement.  The ${CATEGORY}/${PN}:${SLOT} style turned out to be much easier to implement than I had initially expected.
Comment 11 Zac Medico gentoo-dev 2006-10-05 05:02:50 UTC
I've added support for global updates slotmoves in svn r4597 and best_match_to_list() is svn r4598.  I think that completes support for slot deps (aside from the additional behavior suggested in comment #6).
Comment 12 Zac Medico gentoo-dev 2006-10-05 16:18:33 UTC
This has been released in 2.1.2_pre2-r4.
Comment 13 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-10-07 03:53:28 UTC
Request from comment 6 moved to bug 150368, for anyone interested.