Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaranm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Self-circular dependencies
Date: Sun, 05 Feb 2006 22:16:14
Message-Id: 20060205221100.38e21aa5@snowdrop.home
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.
6 Typical example: you're coding a foo.eclass, that is used by foo and
7 various foo-extras. In the eclass, you set:
9 DEPEND=">=fnord-oink/foo-2.0"
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.
16 The following inside an eclass is totally legal:
18 if [[ "${PN}" != "foo" ]] ; then
19 DEPEND=">=fnord-oink/foo-2.0"
20 fi
22 Please give serious thought to doing this where applicable.
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.
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:
37 --
38 Ciaran McCreesh : Gentoo Developer (King of all Londinium)
39 Mail : ciaranm at
40 Web :


File name MIME type
signature.asc application/pgp-signature


Subject Author
Re: [gentoo-dev] Self-circular dependencies Mike Frysinger <vapier@g.o>