Another not-so-uncommon issue that crops up: packages DEPENDing upon
themselves. Sometimes this is legit -- one of the Ada compilers, for
example, DEPENDs upon || ( itself another-compiler ). Sometimes,
however, it's the result of eclass screwups.

Typical example: you're coding a foo.eclass, that is used by foo and
various foo-extras. In the eclass, you set:

DEPEND=">=fnord-oink/foo-2.0"

Which, for foo-extras, is all well and good. However, for foo, which
also inherits the foo eclass, you get h0rked deps. Portage currently
mostly ignores circular dependencies -- however, relying upon this
behaviour probably isn't a good idea.

The following inside an eclass is totally legal:

if [[ "${PN}" != "foo" ]] ; then
    DEPEND=">=fnord-oink/foo-2.0"
fi

Please give serious thought to doing this where applicable.

A similar issue: Portage lets you block yourself, and will ignore the
block. So if foo-2.0 has DEPEND="!fnord-oink/foo", you can still
install foo. (This is a separate thing from blocking specific versions
of yourself, which you may want to do on occasion if a package has a
weird upgrade cycle or is slotted.) Again, please try to avoid relying
upon this behaviour, since it's extremely confusing.

I'll prod on IRC / file bugs for any obvious cases where it's
definitely wrong. There's also a full list, complete with a whole load
of legit cases, at:

http://dev.gentoo.org/~ciaranm/tmp/find_self_circular_deps.txt

-- 
Ciaran McCreesh : Gentoo Developer (King of all Londinium)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm

Attachment: signature.asc
Description: PGP signature

Reply via email to