Discussion:
[gentoo-dev] DEPEND/RDEPEND question
(too old to reply)
Alin Nastac
2006-04-25 07:10:11 UTC
Permalink
Lets say a package foo depends on bar, both at compile time and run time.
Shouldn't DEPEND _and_ RDEPEND of the foo package reflect that
dependency? I usually set DEPEND="$RDEPEND ..." or vice-versa (depending
on which is the most demanding). Am I utterly wrong here?
I know that when a package is installed the usual way (not from a binary
tarball) dependencies==RDEPEND+DEPEND, but portage functionality could
change in the future. It may not be the wisest decision ever made, but
portage could very well remove whatever dependencies are found in DEPEND
- RDEPEND, once the package is installed.
Harald van Dijk
2006-04-25 07:20:13 UTC
Permalink
Post by Alin Nastac
Lets say a package foo depends on bar, both at compile time and run time.
Shouldn't DEPEND _and_ RDEPEND of the foo package reflect that
dependency? I usually set DEPEND="$RDEPEND ..." or vice-versa (depending
on which is the most demanding). Am I utterly wrong here?
Unless there's been a change I'm not aware of, that's right. You should
often use something similar to
COMMON="..."
DEPEND="$COMMON ..."
RDEPEND="$COMMON ..."
when not exactly all of $DEPEND is part of RDEPEND or vice versa though.
Post by Alin Nastac
I know that when a package is installed the usual way (not from a binary
tarball) dependencies==RDEPEND+DEPEND, but portage functionality could
change in the future. It may not be the wisest decision ever made, but
portage could very well remove whatever dependencies are found in DEPEND
- RDEPEND, once the package is installed.
You already mentioned binary packages. In addition to that, I think bad
dependencies can break things even under current portage versions by
building with ROOT set.

Something worth noting is that if RDEPEND is unset, it defaults to
$DEPEND, so in some cases, DEPEND="..." can be enough even if there are
also runtime dependencies. However, if RDEPEND is set at all, it should
be complete (except that system packages of course can be omitted).
--
gentoo-***@gentoo.org mailing list
Alec Warner
2006-04-25 08:30:07 UTC
Permalink
Post by Alin Nastac
Lets say a package foo depends on bar, both at compile time and run time.
Shouldn't DEPEND _and_ RDEPEND of the foo package reflect that
dependency? I usually set DEPEND="$RDEPEND ..." or vice-versa (depending
on which is the most demanding). Am I utterly wrong here?
I know that when a package is installed the usual way (not from a binary
tarball) dependencies==RDEPEND+DEPEND, but portage functionality could
change in the future. It may not be the wisest decision ever made, but
portage could very well remove whatever dependencies are found in DEPEND
- RDEPEND, once the package is installed.
It needs to be in both. For example if you only set it in DEPEND,
merging to ROOT!=/ would break as the dep would get installed in / and
not ROOT, so the app would fail to run.

-Antarus
--
gentoo-***@gentoo.org mailing list
Carsten Lohrke
2006-04-30 14:00:24 UTC
Permalink
Post by Alin Nastac
Lets say a package foo depends on bar, both at compile time and run time.
Shouldn't DEPEND _and_ RDEPEND of the foo package reflect that
dependency? I usually set DEPEND="$RDEPEND ..." or vice-versa (depending
on which is the most demanding). Am I utterly wrong here?
This is right, when there're more dependencies in DEPEND than in RDEPEND. If
DEPEND == RDEPEND you should leave either one unset, as Portage assumes that
DEPEND == RDEPEND in that case.


To quote the ebuild policy:

"The DEPEND variable inside your foo-x.y.z.ebuild tells Portage about which
packages are needed to build foo. The RDEPEND variable specifies which
packages are needed for foo to run. You only need to explicitly specify
RDEPEND if the ebuild's runtime dependencies are different than what you
specified in DEPEND; if not specified, RDEPEND will default to your DEPEND
settings. Never set RDEPEND to DEPEND yourself in an ebuild."


Carsten

Loading...