From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 22BD9138350 for ; Wed, 29 Jan 2020 08:00:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55C04E085E; Wed, 29 Jan 2020 07:59:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 28B95E085E for ; Wed, 29 Jan 2020 07:59:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F136334E4C9 for ; Wed, 29 Jan 2020 07:59:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 83AF0106 for ; Wed, 29 Jan 2020 07:59:56 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1580284707.a7e1e6accfd537734321ddcefcc0515fe64a25e5.ulm@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/ X-VCS-Repository: proj/devmanual X-VCS-Files: general-concepts/dependencies/text.xml X-VCS-Directories: general-concepts/dependencies/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: a7e1e6accfd537734321ddcefcc0515fe64a25e5 X-VCS-Branch: master Date: Wed, 29 Jan 2020 07:59:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d3b8001e-7e83-4719-96b6-2a0ee7b83f47 X-Archives-Hash: f8bbb62b05735653698169cc002a8ba3 commit: a7e1e6accfd537734321ddcefcc0515fe64a25e5 Author: Michał Górny gentoo org> AuthorDate: Sun Dec 29 08:47:41 2019 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Wed Jan 29 07:58:27 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a7e1e6ac general-concepts/dependencies: Describe circular deps in detail Signed-off-by: Michał Górny gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index dde6cda..2aca289 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -620,6 +620,55 @@ RESTRICT="!test? ( test )" DEPEND="test? ( dev-util/foo )" + + + +
+Circular Dependencies + + +

+Circular dependencies occur if one or more of package's (possibly indirect) +dependencies depend on the package itself. This creates a dependency cycle where +each of the packages must technically be installed before the other. +For example, if package A depends on B, B depends on C and C depends on A, then +the package manager cannot install A before C, and C before A. +

+ +

+There are three kinds of circular dependencies: +

+ +
    +
  1. + Circular dependencies that occur if only one of the packages strictly needs + to be installed before the other. For example, dev-python/certifi + strictly requires dev-python/setuptools to build but the latter + package requires the former for some runtime functionality. As a result, + dev-python/certifi can be installed later than the other package. + PDEPEND is used to express this and automatically resolve + the circular dependency. +
  2. + +
  3. + Circular dependencies that occur if the cycle applies only to some + combination of USE flags on one of the packages. For example, running tests + in dev-python/setuptools requires a number of packages which require + dev-python/setuptools to be installed first. This kind of circular + dependency can be resolved by the user by adjusting USE flags on one + of the packages, e.g. by disabling tests on dev-python/setuptools, + and reenabling them once the dependency is initially installed. +
  4. + +
  5. + Circular dependencies that cannot be resolved using the regular means. + For example, dev-util/cmake used to depend + on dev-libs/jsoncpp, while the latter package used the former + to build. Resolving this kind of dependency usually requires bundling one + of the dependencies conditionally, or providing an alternate bootstrap path. +
  6. +
+