1 |
Another not-so-uncommon issue that crops up: packages DEPENDing upon |
2 |
themselves. Sometimes this is legit -- one of the Ada compilers, for |
3 |
example, DEPENDs upon || ( itself another-compiler ). Sometimes, |
4 |
however, it's the result of eclass screwups. |
5 |
|
6 |
Typical example: you're coding a foo.eclass, that is used by foo and |
7 |
various foo-extras. In the eclass, you set: |
8 |
|
9 |
DEPEND=">=fnord-oink/foo-2.0" |
10 |
|
11 |
Which, for foo-extras, is all well and good. However, for foo, which |
12 |
also inherits the foo eclass, you get h0rked deps. Portage currently |
13 |
mostly ignores circular dependencies -- however, relying upon this |
14 |
behaviour probably isn't a good idea. |
15 |
|
16 |
The following inside an eclass is totally legal: |
17 |
|
18 |
if [[ "${PN}" != "foo" ]] ; then |
19 |
DEPEND=">=fnord-oink/foo-2.0" |
20 |
fi |
21 |
|
22 |
Please give serious thought to doing this where applicable. |
23 |
|
24 |
A similar issue: Portage lets you block yourself, and will ignore the |
25 |
block. So if foo-2.0 has DEPEND="!fnord-oink/foo", you can still |
26 |
install foo. (This is a separate thing from blocking specific versions |
27 |
of yourself, which you may want to do on occasion if a package has a |
28 |
weird upgrade cycle or is slotted.) Again, please try to avoid relying |
29 |
upon this behaviour, since it's extremely confusing. |
30 |
|
31 |
I'll prod on IRC / file bugs for any obvious cases where it's |
32 |
definitely wrong. There's also a full list, complete with a whole load |
33 |
of legit cases, at: |
34 |
|
35 |
http://dev.gentoo.org/~ciaranm/tmp/find_self_circular_deps.txt |
36 |
|
37 |
-- |
38 |
Ciaran McCreesh : Gentoo Developer (King of all Londinium) |
39 |
Mail : ciaranm at gentoo.org |
40 |
Web : http://dev.gentoo.org/~ciaranm |