[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: a970eb2d03e0856beaac41786e9e27fb7376875a Author: Petr Vaněk atlas cz> AuthorDate: Wed Sep 27 07:22:02 2023 + Commit: Ulrich Müller gentoo org> CommitDate: Wed Sep 27 08:29:33 2023 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a970eb2d general-concepts/dependencies: use tag for dev-util/ebuildtester Signed-off-by: Petr Vaněk atlas.cz> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index aea0d7f..b041444 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -702,7 +702,7 @@ package: A sure-way to find missing dependencies is to test your ebuild in a deprived environment. Chroots, containers, virtual machines and -dev-util/ebuildtester can achieve this. +dev-util/ebuildtester can achieve this.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 6ea40822c59d94513f80f8a6d14c125c8e9aec0c Author: Florian Schmaus gentoo org> AuthorDate: Thu Dec 23 19:19:10 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Fri Jun 24 09:12:27 2022 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6ea40822 general-concepts/dependencies: add paragraph explaining example Add a small paragraph explaining the existing slot-operator example. This is scavenged from my proposed change for bug #739858. Signed-off-by: Florian Schmaus gentoo.org> Bug: https://bugs.gentoo.org/739858 [Commits squashed; small fixes according to style guide.] Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 32 1 file changed, 32 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 0ff903d..689fad0 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -421,6 +421,38 @@ RDEPEND="media-libs/cogl:1.0= gnutls? ( =net-libs/gnutls-2.8:= )" + +means that only the '1.0' slot is acceptable for media-libs/cogl and +that sub-slot changes of media-libs/cogl will cause a rebuild of the +dependent package. It furthermore means that every slot of +net-libs/gnutls is acceptable but any slot change is causing a rebuild. + + + +The :slot dependency syntax continues to behave like in EAPI=4 or +earlier, i.e. it indicates that only the specific slot value is acceptable and +that the package will not break when the currently installed version of the +dependency is replaced by a version with a different sub-slot. + + + +For example: + + + +RDEPEND="dev-libs/foo:2= +=dev-libs/bar-0.9:= +media-gfx/baz:* +x11-misc/wombat:0" + + + +means that the package should be rebuilt when foo:2 or +=bar-0.9 are upgraded to versions with different subslots. On the +other hand, changes in slot or sub-slots of baz should be ignored, and +sub-slot changes of wombat:0 should be ignored. + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 94057052e439ab6fe70cb0560211ce36d56ec2b8 Author: Ulrich Müller gentoo org> AuthorDate: Fri May 27 08:59:21 2022 + Commit: Ulrich Müller gentoo org> CommitDate: Fri May 27 08:59:21 2022 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=94057052 general-concepts/dependencies: Whitespace Fixes: d08d5f0dea3d8580c55a052d6424863d6aeb8ae9 Fixes: 6c0b51ae63833c2ddfd58412727c0004db06d605 Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 59b1b37..0ff903d 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -631,7 +631,7 @@ package: Use a tool like scanelf -n (from app-misc/pax-utils) or objdump -p (from sys-devel/binutils) to list DT_NEEDED -entries. +entries. app-portage/iwdevtools and portage's own qa-unresolved-soname-deps FEATURE can help finding these. @@ -804,7 +804,7 @@ requirements. For example, a package needs dep1 and dep2, but dep1 since it currently pulls dep2 too, but in the future, dep1 might drop dep2 as a dependency, or make it conditional with USE flags. This would then break building your ebuild. - +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: d08d5f0dea3d8580c55a052d6424863d6aeb8ae9 Author: Joonas Niilola gentoo org> AuthorDate: Sat Apr 23 12:32:51 2022 + Commit: Joonas Niilola gentoo org> CommitDate: Sun May 22 06:36:57 2022 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d08d5f0d general-concepts/dependencies: add new section for indirect deps Signed-off-by: Joonas Niilola gentoo.org> general-concepts/dependencies/text.xml | 17 + 1 file changed, 17 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index ef27ac2..ab1a799 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -781,6 +781,23 @@ There are three kinds of circular dependencies: + + + + +Indirect dependencies + + + +Always list each direct dependency that your package needs to build and run +correctly. Do not rely on dependency chains to meet the dependency +requirements. For example, a package needs dep1 and dep2, but +dep1 also depends on dep2. You might consider just adding +dep1 since it currently pulls dep2 too, but in the future, +dep1 might drop dep2 as a dependency, or make it conditional with +USE flags. This would then break building your ebuild. + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 6c0b51ae63833c2ddfd58412727c0004db06d605 Author: Joonas Niilola gentoo org> AuthorDate: Sat Apr 23 12:42:10 2022 + Commit: Joonas Niilola gentoo org> CommitDate: Sun May 22 06:37:02 2022 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6c0b51ae general-concepts/dependencies: expand on finding correct deps a bit Signed-off-by: Joonas Niilola gentoo.org> Closes: https://github.com/gentoo/devmanual/pull/284 general-concepts/dependencies/text.xml | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index ab1a799..59b1b37 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -631,7 +631,9 @@ package: Use a tool like scanelf -n (from app-misc/pax-utils) or objdump -p (from sys-devel/binutils) to list DT_NEEDED -entries +entries. +app-portage/iwdevtools and portage's own qa-unresolved-soname-deps +FEATURE can help finding these. Look in configure.ac @@ -647,12 +649,12 @@ package: Look at the application/library website Check the application website for possible dependencies that they suggest -are needed +are needed. Read the README and INSTALL for the package They usually also contain useful information about building and installing -packages +packages. Remember non-binary dependencies such as pkg-config, doc generation @@ -664,6 +666,12 @@ package: are clearly stated. Again, such dependencies usually belong in BDEPEND. + Testing in chroots, containers and virtual machines + +A sure-way to find missing dependencies is to test your ebuild in a +deprived environment. Chroots, containers, virtual machines and +dev-util/ebuildtester can achieve this. +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 5ef9e1d93aad7538c0c30cd076e956c2947ef4d8 Author: Florian Schmaus gentoo org> AuthorDate: Thu Dec 23 19:17:28 2021 + Commit: Sam James gentoo org> CommitDate: Mon Feb 21 05:21:44 2022 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=5ef9e1d9 general-concepts/dependencies: improve explaination of slot operators The section previously had hard to parse sentences like "[…] and that your package should be rebuilt if the version best matching the runtime dependency is updated to a version with a different slot or subslot" for the := operator. This commit attempts to improve the readability of the section. The change superseeds my proposed change in bug #739858. Thanks to Sam James for reviewing this. :) Signed-off-by: Florian Schmaus gentoo.org> Bug: https://bugs.gentoo.org/739858 Closes: https://github.com/gentoo/devmanual/pull/259 Signed-off-by: Sam James gentoo.org> general-concepts/dependencies/text.xml | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 1abebc8..ef27ac2 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -387,18 +387,19 @@ or sub-slot: -:= means that any slot is acceptable, and that your package should be -rebuilt if the version best matching the runtime dependency is updated to a -version with a different slot or subslot; +:= means that any slot is acceptable. Additionally indicates that +your package should be rebuilt if the version best matching the runtime +dependency is updated to a version with a different slot or subslot. -:* means that any slot is acceptable, and explicitly declares that -changes in the slot or sub-slot can be ignored; +:* means that any slot is acceptable. Furthermore, this slot +operator explicitly declares that changes in the slot or sub-slot can be +ignored. -:SLOT= means that only the 'SLOT' slot is acceptable, and that your -package should be rebuilt if the version matching the runtime dependency is -updated to another version with this slot but with a different subslot; +:SLOT= means that only the 'SLOT' slot is acceptable. It otherwise +behaves identically to the := operator. That is, the package must be +rebuilt if the sub-slot of the dependency changes. :SLOT means that only the 'SLOT' slot is acceptable, and that changes
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: a4828a6aeeae3b413ecce168b427122cc693f887 Author: Florian Schmaus gentoo org> AuthorDate: Thu Dec 23 19:10:36 2021 + Commit: Sam James gentoo org> CommitDate: Mon Feb 21 05:21:40 2022 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a4828a6a general-concepts/dependencies: indent xml for better raw readability This is scavenged from my proposed change for bug #739858. Signed-off-by: Florian Schmaus gentoo.org> Bug: https://bugs.gentoo.org/739858 Signed-off-by: Sam James gentoo.org> general-concepts/dependencies/text.xml | 36 ++ 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index a3ea540..1abebc8 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -386,19 +386,29 @@ or sub-slot: - := means that any slot is acceptable, and that your package should be - rebuilt if the version best matching the runtime dependency is updated to a - version with a different slot or subslot; - :* means that any slot is acceptable, and explicitly declares that - changes in the slot or sub-slot can be ignored; - :SLOT= means that only the 'SLOT' slot is acceptable, and that your - package should be rebuilt if the version matching the runtime dependency is - updated to another version with this slot but with a different subslot; - :SLOT means that only the 'SLOT' slot is acceptable, and that changes - in the sub-slot can be ignored (like in previous EAPIs). - :SLOT/SUBSLOT means a dependency on a specific slot and sub-slot pair, - which can be useful for packages installing pre-built binaries that require a - library with a particular soname version corresponding to the sub-slot. + +:= means that any slot is acceptable, and that your package should be +rebuilt if the version best matching the runtime dependency is updated to a +version with a different slot or subslot; + + +:* means that any slot is acceptable, and explicitly declares that +changes in the slot or sub-slot can be ignored; + + +:SLOT= means that only the 'SLOT' slot is acceptable, and that your +package should be rebuilt if the version matching the runtime dependency is +updated to another version with this slot but with a different subslot; + + +:SLOT means that only the 'SLOT' slot is acceptable, and that changes +in the sub-slot can be ignored (like in previous EAPIs). + + +:SLOT/SUBSLOT means a dependency on a specific slot and sub-slot pair, +which can be useful for packages installing pre-built binaries that require a +library with a particular soname version corresponding to the sub-slot. +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: e20a78631323ed533041a23d0cb1f91e5f301713 Author: Mike Frysinger gentoo org> AuthorDate: Tue Oct 19 09:17:19 2021 + Commit: Mike Frysinger gentoo org> CommitDate: Tue Oct 19 09:27:14 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e20a7863 dependencies: clarify cross-compiling and system shorthands Try and clarify that BDEPEND/DEPEND are split based on the install targets, not only when the literal $CBUILD & $CHOST values differ, and thus only when "cross-compiling" is used. Signed-off-by: Mike Frysinger gentoo.org> general-concepts/dependencies/text.xml | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 1340b1c..a3ea540 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -34,15 +34,15 @@ for how dependencies and revisions interact. In order to avoid ambiguity, we use the following terms to indicate different -systems when cross-compiling: +systems when cross-compiling. They serve as a shorthand for an overall system +in addition to their literal value (e.g. $CHOST). CBUILD The system on which the build is performed. Dependencies that apply -to the CBUILD system can be executed during build time. When -cross-compiling, they are not installed into the system being built. +to the CBUILD system can be executed during build time. CHOST @@ -53,8 +53,15 @@ systems when cross-compiling: -When not cross-compiling, CBUILD and CHOST have the same value and both classes -of dependencies are merged. +When cross-compiling, CBUILD and CHOST are naturally different, as are the +actual install paths for the different types of dependencies. + + + +Note however that, while cross-compiling is used to help explain these concepts, +it is not strictly required. CBUILD and CHOST could target the exact same +hardware, but be installed into distinct SYSROOT/ROOT paths. The dependency +distinctions still apply even if it isn't, strictly speaking, cross-compiling.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: c47bae818f63867150e6893232e289f242eb9622 Author: Sam James gentoo org> AuthorDate: Sun Oct 3 02:09:39 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Wed Oct 13 13:39:14 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=c47bae81 general-concepts/dependencies: clarify strong blocker usage Noticed we could be a bit clearer in the devmanual after a discussion on a PR [0]. We've had a lot of confusion over when it's appropriate to use strong blockers, so I think giving a non-abstract "example" is helpful here. [0] https://github.com/gentoo/gentoo/pull/22433#discussion_r720746670 Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index c175cfa..1340b1c 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -305,6 +305,12 @@ the package from source, and may not apply once the package is installed or when it is installed from a binary package. + +The most common use for strong blockers is where another package simply +being installed causes a build failure. Strong blockers are not to be used +to prevent just file collisions. + + If both weak and strong blockers match a given package, the strong blocker takes precedence.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 54ee612ef406435d1f403d8f76ed422921ffb707 Author: Sam James gentoo org> AuthorDate: Sat Mar 20 15:00:27 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Mon Mar 29 20:41:38 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=54ee612e general-concepts/dependencies: list any-of dependencies in preferred order This eases Portage dependency resolution. Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index f49e319..c175cfa 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -461,6 +461,12 @@ DEPEND="!build? ( Any of Many Dependencies + +To ease dependency resolution for Portage, it is recommended that you sort +the elements in preferred order first. See +https://bugs.gentoo.org/489458;>this bug for more context. + + To depend on either foo or bar:
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: c0db3d2014ed39035a0b840a7264d13f044acd31 Author: Sam James gentoo org> AuthorDate: Sat Mar 20 14:55:10 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Mon Mar 29 20:41:37 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=c0db3d20 general-concepts/dependencies: slightly modernise Qt example Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 1b8f425..eac1967 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -347,7 +347,7 @@ the package name, where 'SLOT' is the SLOT of the package wanted: -DEPEND="qt3? ( x11-libs/qt:3 ) +DEPEND="qt5? ( dev-qt/qtcore:5 ) gtk? ( x11-libs/gtk+:2 ) @@ -356,7 +356,7 @@ To depend on a specific version or version-range within a SLOT we use: -DEPEND="qt3? ( ~x11-libs/qt-3.3.8:3 ) +DEPEND="qt5? ( ~dev-qt/qtcore-5.15.2:5 ) gtk? ( =x11-libs/gtk+-2.24.9:2 )
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: a0af214749946a602a8fef95495ca9150bf93946 Author: Sam James gentoo org> AuthorDate: Sat Mar 20 14:56:44 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Mon Mar 29 20:41:38 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a0af2147 general-concepts/dependencies: emphasise BDEPEND for build-system dependencies Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index eac1967..f49e319 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -626,12 +626,13 @@ package: Remember non-binary dependencies such as pkg-config, doc generation -programs, etc. +programs, etc. Such programs would usually belong in BDEPEND. Usually the build process requires some dependencies such as intltool, libtool, pkg-config, doxygen, scrollkeeper, gtk-doc, etc. Make sure those -are clearly stated. +are clearly stated. Again, such dependencies usually belong in +BDEPEND.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 9f40ea2d5d53a204c2ccfade2f5f1ef19555fcc7 Author: Sam James gentoo org> AuthorDate: Fri Mar 5 19:28:08 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Mar 11 12:35:21 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=9f40ea2d general-concepts/dependencies: add sorting Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 8 1 file changed, 8 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 319137f..6afefea 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -9,6 +9,14 @@ Automatic dependency resolution is one of the most useful features provided by emerge. + +You are encouraged to sort dependencies alphabetically, with unconditional +dependencies grouped together, then all conditional dependencies. There is an +exception: you may sort dependencies as per upstream listings if it eases +checking for changes. Some projects may have different policies consult +them if you're not sure. + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 30036bbb6f48b4c61a166e2cf80451b74d6dfda0 Author: Sam James gentoo org> AuthorDate: Fri Mar 5 19:43:23 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Mar 11 12:35:22 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=30036bbb general-concepts/dependencies: add reference to Ebuild Revisions Let's make a note that it's especially important to consider the links between dependencies and ebuild revisions. Closes: https://github.com/gentoo/devmanual/pull/197 Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 9366343..8cf3999 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -17,6 +17,12 @@ checking for changes. Some projects may have different policies consult them if you're not sure. + +Please also see the following section on + +for how dependencies and revisions interact. + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 558db5739d41e9b8b3d747ed75a72c3b35bfa6f4 Author: Sam James gentoo org> AuthorDate: Fri Mar 5 19:29:12 2021 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Mar 11 12:35:21 2021 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=558db573 general-concepts/dependencies: sort dependencies in example Signed-off-by: Sam James gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 6afefea..9366343 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -431,7 +431,9 @@ This can be nested: DEPEND="!build? ( + =sys-libs/ncurses-5.2-r2 gcj? ( + =media-libs/libart_lgpl-2.1 gtk? ( x11-libs/libXt x11-libs/libX11 @@ -441,9 +443,7 @@ DEPEND="!build? ( =x11-libs/gtk+-2.2 x11-libs/pango ) - =media-libs/libart_lgpl-2.1 ) - =sys-libs/ncurses-5.2-r2 nls? ( sys-devel/gettext ) )"
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 3dc3be9929eaa97576882ab23ac02d9f51368f2d Author: Ulrich Müller gentoo org> AuthorDate: Wed Apr 15 18:25:07 2020 + Commit: Ulrich Müller gentoo org> CommitDate: Sat May 9 11:06:19 2020 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3dc3be99 general-concepts/dependencies: Tips for checking dependencies. This is taken from the Gentoo Developer Handbook, chapter "Ebuild HOWTO" (proj/en/devrel/handbook/hb-guide-ebuild.xml), section "Package Dependencies", subsection "Important Notes", which in turn had been copied from chapter "Common ebuild Mistakes" (proj/en/devrel/handbook/hb-guide-common-mistakes.xml), section "Common Ebuild Writing Mistakes", subsection "DEPEND is incomplete". Permission to reuse the CC-BY-SA-1.0 work under CC BY-SA version 2.0 or any later version of that license obtained from author plasmaroo per e-mail on 2015-04-16, Message-ID mail.gmail.com>. Closes: https://bugs.gentoo.org/465764 Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 51 ++ 1 file changed, 51 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 52d053e..319137f 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -573,6 +573,57 @@ DEPEND=" + +Tips for Checking Dependencies + + + +It is important to ensure that all the dependencies are complete for your +package: + + + + Look at installed binaries/libraries + +Use a tool like scanelf -n (from app-misc/pax-utils) or +objdump -p (from sys-devel/binutils) to list DT_NEEDED +entries + + Look in configure.ac + +Look for checks for packages in here. Things to look out for are pkg-config +checks or AM_* functions that check for a specific version. + + Look at included .spec files + +A good indication of dependencies is to look at the included .spec +files for relevant deps. However, do not trust them to be the definitive +complete list of dependencies. + + Look at the application/library website + +Check the application website for possible dependencies that they suggest +are needed + + Read the README and INSTALL for the package + +They usually also contain useful information about building and installing +packages + + +Remember non-binary dependencies such as pkg-config, doc generation +programs, etc. + + +Usually the build process requires some dependencies such as intltool, +libtool, pkg-config, doxygen, scrollkeeper, gtk-doc, etc. Make sure those +are clearly stated. + + + + + + Implicit System Dependency
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: be93eaeb521f18b0f8b563accd1d2b398bb87b02 Author: Ulrich Müller gentoo org> AuthorDate: Wed Apr 15 18:23:47 2020 + Commit: Ulrich Müller gentoo org> CommitDate: Sat May 9 11:06:19 2020 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=be93eaeb general-concepts/dependencies: Better section structure. Collect similar topics as subsections under new section headers. Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 114 + 1 file changed, 60 insertions(+), 54 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 1a1d970..52d053e 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -2,16 +2,19 @@ Dependencies - Automatic dependency resolution is one of the most useful features provided by emerge. + +Dependency types + + CHOST vs CBUILD @@ -41,9 +44,9 @@ of dependencies are merged. - + - + Build Dependencies @@ -67,9 +70,9 @@ In earlier EAPIs, all build dependencies are placed in DEPEND. - + - + Runtime Dependencies @@ -91,9 +94,9 @@ Items which are in RDEPEND but not DEPEND could in theory b - + - + Post Dependencies @@ -105,39 +108,13 @@ while in general case RDEPEND should be used instead. + -Implicit System Dependency - +Dependency Syntax - -All packages have an implicit compile-time and runtime dependency upon the -entire @system set. It is therefore not necessary, nor -advisable, to -specify dependencies upon toolchain packages like gcc, libc and -so on, except where specific versions or packages (for example, glibc -over uclibc) are required. Note that this rule also needs consideration -for packages like flex, zlib and libtool, which aren't in -the @system set for every profile. For example, the embedded -profile doesn't have zlib in @system, the libtool -ABI might -change and break building order and flex might get removed from the -@system set in future. - - - -However, packages which are included in the @system set, or are -dependencies of @system set packages, should generally include -a complete dependency list (excluding bootstrap packages). This makes -emerge -e @system -possible when installing from a stage 1 or stage 2 tarball. - - - - - - + Basic Dependency Syntax @@ -159,9 +136,9 @@ When specifying names, the category part should be treated as mandatory. - + - + Version Dependencies @@ -179,7 +156,7 @@ This states that at least version 0.9.7d of openssl is required. - + Version Specifiers @@ -222,9 +199,9 @@ Available version specifiers are: - + - + Ranged Dependencies @@ -244,9 +221,9 @@ asterisk. Also note that when selecting all versions in a specific - + - + Blockers @@ -343,10 +320,10 @@ newer package that caused the issues. + - - + SLOT Dependencies @@ -370,7 +347,7 @@ DEPEND="qt3? ( ~x11-libs/qt-3.3.8:3 ) - + Slot Operators @@ -407,10 +384,10 @@ RDEPEND="media-libs/cogl:1.0= + - - + USE-Conditional Dependencies @@ -464,9 +441,9 @@ DEPEND="!build? ( - + - + Any of Many Dependencies @@ -487,7 +464,7 @@ DEPEND="baz? ( || ( app-misc/foo app-misc/bar ) )" - + Any of Many Versus USE @@ -509,10 +486,10 @@ flag is not necessary if and only if all of the following hold: + - - + Built with USE Dependencies @@ -567,7 +544,7 @@ There are also shortcuts for conditional situations: - + Use dependency defaults @@ -592,9 +569,38 @@ DEPEND=" + + +Implicit System Dependency + + + +All packages have an implicit compile-time and runtime dependency upon the +entire @system set. It is therefore not necessary, nor advisable, to +specify dependencies upon toolchain packages like gcc, libc and +so on, except where specific versions or packages (for example, glibc +over uclibc) are required. Note that this rule also needs consideration +for packages like flex, zlib and libtool, which aren't in +the @system set for every profile. For example, the embedded profile +doesn't have zlib in @system, the libtool ABI might +change and break building order and flex might get removed from the +@system set in future. + + + +However, packages which are included in the @system set, or are +dependencies of @system set packages, should generally include +a complete dependency list (excluding bootstrap packages). This makes +emerge -e @system possible when installing from a stage 1 or stage 2 +tarball. + + + + + Test Dependencies
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: a7e1e6accfd537734321ddcefcc0515fe64a25e5 Author: Michał Górny gentoo org> AuthorDate: Sun Dec 29 08:47:41 2019 + Commit: Ulrich Müller gentoo org> CommitDate: Wed Jan 29 07:58:27 2020 + 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: + + + + +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. + + + +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. + + + +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. + + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: be7ec7f3d2965719ffb69879bd879fc9b48c6dc1 Author: Michał Górny gentoo org> AuthorDate: Sun Dec 29 08:03:11 2019 + Commit: Ulrich Müller gentoo org> CommitDate: Wed Jan 29 07:58:26 2020 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=be7ec7f3 general-concepts/dependencies: Improve PDEPEND Rewrite the PDEPEND description to be more focused on its purpose. Rename to 'Post Dependencies' to match PMS. Reverse the weird backwards logic that indicated that they might be installed before the package into saying that they may be installed after it. Clearly indicate that its only purpose is to resolve circular dependencies. Signed-off-by: Michał Górny gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 8deca1f..dde6cda 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -94,16 +94,14 @@ Items which are in RDEPEND but not DEPEND could in theory b -Post-Merge Dependencies +Post Dependencies -The PDEPEND variable specifies dependencies that should be -merged after the package, but which may be merged at any time, -if the former is not possible. This is sometimes used for plugins -that have a dependency upon the package being merged. Generally -PDEPEND should be avoided in favour of RDEPEND except -where this will create circular dependency chains. +The PDEPEND variable specifies runtime dependencies that do not strictly +require being satisfied immediately. They can be merged after +the package. This variable is used purely to resolve circular dependencies, +while in general case RDEPEND should be used instead.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: d25e172b16fa3c59f6868dc164bc6dcc801c4fc2 Author: Michał Górny gentoo org> AuthorDate: Sun Dec 29 07:59:28 2019 + Commit: Ulrich Müller gentoo org> CommitDate: Wed Jan 29 07:58:26 2020 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d25e172b general-concepts/dependencies: Document BDEPEND Signed-off-by: Michał Górny gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 48 -- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 32feff1..8deca1f 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -11,17 +11,61 @@ provided by emerge. + +CHOST vs CBUILD + + + +In order to avoid ambiguity, we use the following terms to indicate different +systems when cross-compiling: + + + + CBUILD + +The system on which the build is performed. Dependencies that apply +to the CBUILD system can be executed during build time. When +cross-compiling, they are not installed into the system being built. + + + CHOST + +The system on which the package is going to be executed. When +cross-compiling, dependencies applying to CHOST can not be executed. + + + + +When not cross-compiling, CBUILD and CHOST have the same value and both classes +of dependencies are merged. + + + + + Build Dependencies -The DEPEND ebuild variable should specify any dependencies which are -required to unpack, patch, compile or install the package (but see +Build dependencies are used to specify any dependencies that are required +to unpack, patch, compile, test or install the package (but see for exemptions). + +Starting with EAPI 7, build dependencies are split into two variables: +BDEPEND and DEPEND. BDEPEND specifies dependencies +applicable to CBUILD, i.e. programs that need to be executed during the build, +e.g. virtual/pkgconfig. DEPEND specifies dependencies for CHOST, +i.e. packages that need to be found on built system, e.g. libraries and headers. + + + +In earlier EAPIs, all build dependencies are placed in DEPEND. + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/, ebuild-writing/eapi/, ...
commit: 5a946b416b447318fc092c0e3b320d5a8f88833e Author: Ulrich Müller gentoo org> AuthorDate: Mon Jan 20 17:26:47 2020 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Jan 23 00:01:02 2020 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=5a946b41 ebuild-writing/eapi: Move EAPI=3 information to other sections. - Prefix support: Reference to Prefix documentation moved to ebuild-writing/variables - unpack .xz support: Add list of recognized unpack formats in ebuild-writing/functions/src_unpack Signed-off-by: Ulrich Müller gentoo.org> ebuild-writing/eapi/text.xml | 26 --- ebuild-writing/functions/src_unpack/text.xml | 39 ebuild-writing/variables/text.xml| 2 ++ general-concepts/dependencies/text.xml | 5 +--- 4 files changed, 42 insertions(+), 30 deletions(-) diff --git a/ebuild-writing/eapi/text.xml b/ebuild-writing/eapi/text.xml index 048284f..89b88ff 100644 --- a/ebuild-writing/eapi/text.xml +++ b/ebuild-writing/eapi/text.xml @@ -62,32 +62,6 @@ is the best. Using the features of the latest EAPI is encouraged. - -EAPI=3 - - - - - Gentoo Prefix support - - Support for the EPREFIX, EROOT, and ED - variables. If an ebuild uses one of these, it must be EAPI3 aware. - See https://wiki.gentoo.org/wiki/Project:Prefix/Technical_Documentation;> - Gentoo Prefix Technical Documentation for more information. - - - - unpack supports .xz and .tar.xz - - The unpack command supports xz-archives and xz-compressed tar - files. - - - - - - - EAPI=4 diff --git a/ebuild-writing/functions/src_unpack/text.xml b/ebuild-writing/functions/src_unpack/text.xml index aad45f6..862a41e 100644 --- a/ebuild-writing/functions/src_unpack/text.xml +++ b/ebuild-writing/functions/src_unpack/text.xml @@ -72,6 +72,45 @@ usually simpler to avoid working with ${A}. + +Known file formats + + + +The unpack function recognizes the following file formats: + + + + *.tar + +*.gz, *.Z, +*.tar.gz, *.tgz, *.tar.Z + + +*.bz2, *.bz, +*.tar.bz2, *.tbz2, *.tar.bz, *.tbz + + *.lzma, *.tar.lzma + *.xz, *.tar.xz, *.txz + *.zip, *.ZIP, *.jar + *.a, *.deb + *.7z, *.7Z + *.rar, *.RAR + *.LHA, *.LHa, *.lha, *.lzh + + + +In EAPI 6 and later, filename extensions are matched case-insensitively. + + + +Unless the utility needed for unpacking is in the system set, the ebuild must +specify the necessary build time dependency for it. + + + + + src_unpack Actions diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml index 66a9822..81d4c44 100644 --- a/ebuild-writing/variables/text.xml +++ b/ebuild-writing/variables/text.xml @@ -117,6 +117,8 @@ for these variables when writing ebuilds. EPREFIX The normalised offset-prefix path of an offset installation. + See https://wiki.gentoo.org/wiki/Project:Prefix/Technical_Documentation;> + Gentoo Prefix Technical Documentation for more information. diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 7992571..32feff1 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -32,10 +32,7 @@ exemptions). The RDEPEND ebuild variable should specify any dependencies which are required at runtime. This includes libraries (when dynamically linked), any data -packages and (for interpreted languages) the relevant interpreter. In EAPI=3 or -older, if this variable is not specified it defaults to the value of -DEPEND, however the implicit usage is frowned upon. In EAPI=4, the -implicit behaviour was removed and the assignment is always explicit. +packages and (for interpreted languages) the relevant interpreter.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 68aff5730fe3477bfb4f0990008e620964792b92 Author: Ulrich Müller gentoo org> AuthorDate: Mon Jan 20 20:35:13 2020 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Jan 23 00:01:01 2020 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=68aff573 general-concepts/dependencies: Drop section on if-else USE blocks. If-else USE blocks, i.e. "Legacy Inverse USE-Conditional Dependency Syntax", have been abandoned before EAPI was introduced. Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 30 -- 1 file changed, 30 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 9f2cc47..4e3a84e 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -536,36 +536,6 @@ presence or absence. - -Legacy Inverse USE-Conditional Dependency Syntax - - - - Once upon a time the : conditional operator was allowed in *DEPEND: - - - -DEPEND="use-flag? ( app-misc/foo ) : ( app-misc/bar )" - - - -This syntax is no longer permitted. It is exactly equivalent to the -following, which should be used instead: - - - -DEPEND="use-flag? ( app-misc/foo ) - !use-flag? ( app-misc/bar )" - - - -It is useful to recognise the legacy syntax and to know that it is no longer -valid. - - - - - Test Dependencies
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: e6410dc5f785ebe65ea5231863d9beadf8d38ae0 Author: Göktürk Yüksek gentoo org> AuthorDate: Sat Dec 21 04:39:56 2019 + Commit: Ulrich Müller gentoo org> CommitDate: Sat Dec 21 05:18:17 2019 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e6410dc5 general-concepts/dependencies: remove incorrect indentation in Signed-off-by: Göktürk Yüksek gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index d1d6db2..0c0327a 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -6,8 +6,8 @@ - Automatic dependency resolution is one of the most useful features provided by - emerge. +Automatic dependency resolution is one of the most useful features +provided by emerge.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: b48f5e83b285aa086a844e1e9bd1035d49df122a Author: Thomas Deutschmann whissi de> AuthorDate: Fri Sep 6 14:57:52 2019 + Commit: Göktürk Yüksek gentoo org> CommitDate: Wed Oct 16 18:47:48 2019 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b48f5e83 general-concepts/dependencies: Fix ranged dependencies example Closes: https://github.com/gentoo/devmanual.gentoo.org/pull/106 Acked-by: Michael Orlitzky gentoo.org> Signed-off-by: Thomas Deutschmann whissi.de> Signed-off-by: Göktürk Yüksek gentoo.org> general-concepts/dependencies/text.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 6b0ce38..c91c7e9 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -195,7 +195,7 @@ the asterisk postfix. This is most commonly seen in situations like: -DEPEND="gtk? ( =x11-libs/gtk+-1.2* )" +DEPEND="gtk? ( =x11-libs/gtk+-2* )"
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: c53568d93df9e2c94d0334e1e42e8a6de1a6797a Author: Mike Gilbert gentoo org> AuthorDate: Fri Aug 24 18:21:10 2018 + Commit: Mike Gilbert gentoo org> CommitDate: Mon Sep 10 15:18:05 2018 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=c53568d9 Add section about defining "Test Dependencies" Reviewed-by: Ulrich Müller gentoo.org> general-concepts/dependencies/text.xml | 38 ++ 1 file changed, 38 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 2f10380..6b0ce38 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -578,6 +578,44 @@ valid. + +Test Dependencies + + + +Packages often have optional dependencies that are needed only when running +tests. These should be specified in DEPEND behind a USE flag. Often, the +'test' USE flag is used for this purpose. + + + +Since testing will likely fail when test dependencies are not installed, the +test phase should be disabled in this case. This may be accomplished via USE +conditionals in the RESTRICT variable. + + + +If other optional features must be enabled/disabled when testing, REQUIRED_USE +may be set to express this. + + + +# Define some USE flags +IUSE="debug test" + +# Require debug support when tests are enabled +REQUIRED_USE="test? ( debug )" + +# Disable test phase when test USE flag is disabled +RESTRICT="!test? ( test )" + +# Running tests requires 'foo' to be installed +DEPEND="test? ( dev-util/foo )" + + + + +
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/, tools-reference/sed/, profiles/packages/
commit: de8434b4f59434f5e5bd24ce1f807ab0ec16eed8 Author: Göktürk Yüksek gentoo org> AuthorDate: Tue Mar 27 19:45:18 2018 + Commit: Göktürk Yüksek gentoo org> CommitDate: Sun Apr 22 01:50:43 2018 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=de8434b4 Replace the references to 'system' with '@system' Adopt the set notation using the '@' sign when refering to the system set. Also, system is not a target but a set. Therefore replace any references that refers to @system as 'target' with 'set'. general-concepts/dependencies/text.xml | 17 ++--- profiles/packages/text.xml | 2 +- tools-reference/sed/text.xml | 3 ++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index e43390c..2f10380 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -73,21 +73,24 @@ where this will create circular dependency chains. All packages have an implicit compile-time and runtime dependency upon the -entire system target. It is therefore not necessary, nor advisable, to +entire @system set. It is therefore not necessary, nor +advisable, to specify dependencies upon toolchain packages like gcc, libc and so on, except where specific versions or packages (for example, glibc over uclibc) are required. Note that this rule also needs consideration for packages like flex, zlib and libtool, which aren't in -the system target for every profile. For example, the embedded profile -doesn't have zlib in system target, the libtool ABI might +the @system set for every profile. For example, the embedded +profile doesn't have zlib in @system, the libtool +ABI might change and break building order and flex might get removed from the -system target in future. +@system set in future. -However, packages which are included in the system target, or are -dependencies of system target packages, should generally include a complete -dependency list (excluding bootstrap packages). This makes emerge -e system +However, packages which are included in the @system set, or are +dependencies of @system set packages, should generally include +a complete dependency list (excluding bootstrap packages). This makes +emerge -e @system possible when installing from a stage 1 or stage 2 tarball. diff --git a/profiles/packages/text.xml b/profiles/packages/text.xml index b8215f7..13f98ab 100644 --- a/profiles/packages/text.xml +++ b/profiles/packages/text.xml @@ -6,7 +6,7 @@ The packages file in profiles/ controls the packages pulled in by the -system target. The base/packages file must not be modified without +@system set. The base/packages file must not be modified without discussion on the gentoo-dev list; subprofile overrides are up to the relevant arch teams. diff --git a/tools-reference/sed/text.xml b/tools-reference/sed/text.xml index 02c8c32..3f7a455 100644 --- a/tools-reference/sed/text.xml +++ b/tools-reference/sed/text.xml @@ -62,7 +62,8 @@ A summary of the more common ways of using sed and a description of commonly used address and token patterns follows. Note that some of these constructs are specific to GNU sed 4 on non-GNU userland archs, the sed command must be aliased to GNU sed. Also note that GNU sed 4 is -guaranteed to be installed as part of system. This was not always the case, +guaranteed to be installed as part of @system. This was not +always the case, which is why some packages, particularly those which use sed -i, have DEPEND s upon >=sys-apps/sed-4.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: b63b50810d6e621274ad7d8364404d004bd6d645 Author: Michał Górny gentoo org> AuthorDate: Wed Sep 6 10:04:17 2017 + Commit: Göktürk Yüksek gentoo org> CommitDate: Mon Sep 25 04:28:58 2017 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b63b5081 general-concepts/dependencies: Explain the meaning of hard blockers in DEP/RDEP general-concepts/dependencies/text.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index f83506a..f6cceba 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -245,6 +245,15 @@ RDEPEND="!!app-misc/foo" +Hard blockers apply accordingly to the dependency type defining them. +Blockers defined in RDEPEND are enforced as long as the package +is installed (but do not prevent building binary packages). Blockers +defined purely in DEPEND are enforced only for building +the package from source, and may not apply once the package is installed +or when it is installed from a binary package. + + + Hard blocks require EAPI 2 or newer.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 0fb64d84c35060f60f767fa98553789f660a82f6 Author: Michał Górny gentoo org> AuthorDate: Wed Sep 6 09:59:41 2017 + Commit: Göktürk Yüksek gentoo org> CommitDate: Mon Sep 25 04:28:38 2017 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0fb64d84 general-concepts/dependencies: Improve the description of blockers Improve the text describing blockers to clearly explain the difference between soft and hard blockers, and how are they supposed to be used. Emphasize on using in RDEPEND. general-concepts/dependencies/text.xml | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 18fcefd..f83506a 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -209,19 +209,35 @@ asterisk. Also note that when selecting all versions in a specific -Sometimes two packages cannot be installed in parallel. This is handled by -blockers. A softblocker is specified as follows: +When two packages (package slots, versions) can not be installed +simultaneously, blockers can be used to expose such a conflict +to the package manager. + +There are two kinds of blockers: soft blockers and hard blockers. + + +A soft blocker is defined using the following syntax: + RDEPEND="!app-misc/foo" -Portage will try to resolve this conflict automatically if possible. -Sometimes we need to use a hardblocker to ensure correct emerge order. -Those cannot be resolved by Portage and must be taken care of by the user. -A hardblocker is specified as follows: +The package manager will try to resolve this conflict automatically. +The package blocked by a soft blocker can be uninstalled after +installing the package blocking it. However, it exempts the common +files from file collision checks. Soft blockers are usually used +to solve file collisions between packages and are meaningful only +in RDEPEND. + + + +If it is strictly necessary to resolve the blocker before the package +is built (installed) or if automatic resolution is undesired, +a hard blocker must be used instead. Hard blockers are not resolved +automatically, and are expressed using the following syntax: @@ -229,8 +245,7 @@ RDEPEND="!!app-misc/foo" -Hardblockers always take precedence over softblockers and need at least EAPI=2. -Also note that blockers are usually runtime rather than buildtime. +Hard blocks require EAPI 2 or newer.
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: d82fac36796849882d8718bdb024f7d01daed50a Author: Michał Górny gentoo org> AuthorDate: Wed Sep 6 10:11:16 2017 + Commit: Göktürk Yüksek gentoo org> CommitDate: Mon Sep 25 04:29:21 2017 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d82fac36 general-concepts/dependencies: Add a warning on pure DEPEND soft blockers general-concepts/dependencies/text.xml | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index f6cceba..7c8caeb 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -215,6 +215,10 @@ to the package manager. +The following description applies to all EAPIs starting with EAPI 2. + + + There are two kinds of blockers: soft blockers and hard blockers. @@ -233,11 +237,17 @@ to solve file collisions between packages and are meaningful only in RDEPEND. + +Soft blockers that are pure DEPEND do not work correctly. +While Portage seemingly queues the package for removal, it does not +exempt their contents from file collision checks. Always include your +soft blockers in RDEPEND! + + If it is strictly necessary to resolve the blocker before the package -is built (installed) or if automatic resolution is undesired, -a hard blocker must be used instead. Hard blockers are not resolved -automatically, and are expressed using the following syntax: +is built (installed), a hard blocker must be used instead. Hard blockers +are expressed using the following syntax: @@ -254,10 +264,6 @@ or when it is installed from a binary package. -Hard blocks require EAPI 2 or newer. - - - Specific versions can also be blocked:
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/, ebuild-writing/functions/src_prepare/epatch/, ...
commit: 5a8e432771b80cbc652ad53321c75606d239cedd Author: Johannes Huber johu AT gentoo DOT org AuthorDate: Mon Aug 17 15:30:20 2015 + Commit: Justin Lecher jlec AT gentoo DOT org CommitDate: Mon Aug 17 15:30:20 2015 + URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=5a8e4327 Consistent EAPI declaration Most of occurrence of the EAPI declarations are without the quotes, so align the rest for more consistency. ebuild-writing/functions/src_prepare/epatch/text.xml | 2 +- ebuild-writing/functions/src_prepare/text.xml| 2 +- ebuild-writing/using-eclasses/text.xml | 2 +- general-concepts/autotools/text.xml | 2 +- general-concepts/dependencies/text.xml | 8 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ebuild-writing/functions/src_prepare/epatch/text.xml b/ebuild-writing/functions/src_prepare/epatch/text.xml index 1322a5e..91d869e 100644 --- a/ebuild-writing/functions/src_prepare/epatch/text.xml +++ b/ebuild-writing/functions/src_prepare/epatch/text.xml @@ -8,7 +8,7 @@ The canonical way of applying patches in ebuilds is to use cepatch/c (from ceutils.eclass/c, which you must make sure to import!) inside csrc_prepare/c. This function automatically -handles c-p/c levels, cgunzip/c and so on as necessary. Also note that olds ebuild may still use src_unpack to apply patches. This is because those ebuilds are based in EAPI=1. You are advised to use EAPI=2 and apply your patches in src_prepare function instead. +handles c-p/c levels, cgunzip/c and so on as necessary. Also note that olds ebuild may still use src_unpack to apply patches. This is because those ebuilds are based in EAPI=1. You are advised to use EAPI=2 and apply your patches in src_prepare function instead. /p p diff --git a/ebuild-writing/functions/src_prepare/text.xml b/ebuild-writing/functions/src_prepare/text.xml index 29b1588..3d9030c 100644 --- a/ebuild-writing/functions/src_prepare/text.xml +++ b/ebuild-writing/functions/src_prepare/text.xml @@ -32,7 +32,7 @@ titleDefault csrc_prepare/c/title body p -Starting from EAPI=2, the src_prepare function is the appropriate area to perform +Starting from EAPI=2, the src_prepare function is the appropriate area to perform any kind of patching and source code manipulation, instead of src_unpack. /p codesample lang=ebuild diff --git a/ebuild-writing/using-eclasses/text.xml b/ebuild-writing/using-eclasses/text.xml index de9ec7f..503ce34 100644 --- a/ebuild-writing/using-eclasses/text.xml +++ b/ebuild-writing/using-eclasses/text.xml @@ -34,7 +34,7 @@ After inheriting an eclass, its provided functions can be used as normal. Here's # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=2 +EAPI=2 inherit eutils bash-completion flag-o-matic autotools diff --git a/general-concepts/autotools/text.xml b/general-concepts/autotools/text.xml index 7ae2024..554943a 100644 --- a/general-concepts/autotools/text.xml +++ b/general-concepts/autotools/text.xml @@ -124,7 +124,7 @@ either cMakefile.am/c or cconfigure.ac/c: /p codesample lang=ebuild -EAPI=5 +EAPI=5 inherit autotools diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 24b9902..26dc762 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -229,7 +229,7 @@ RDEPEND=!!app-misc/foo /codesample p -Hardblockers always take precedence over softblockers and need at least EAPI=2. +Hardblockers always take precedence over softblockers and need at least EAPI=2. Also note that blockers are usually eruntime/e rather than buildtime. /p @@ -268,7 +268,7 @@ newer package that caused the issues. p In order to depend on a package in a specific cSLOT/c you must specify -at least cEAPI=1/c. +at least cEAPI=1/c. /p p @@ -295,7 +295,7 @@ DEPEND=qt3? ( ~x11-libs/qt-3.3.8:3 ) body p -In cEAPI=5/c and higher, you can use slot operators appended to the package +In cEAPI=5/c and higher, you can use slot operators appended to the package name to declare whether or not your package should be rebuilt after the versions satisfying its runtime dependencies are updated to versions with a different slot or uri link=::general-concepts/slotting#Sub-Slotssub-slot/uri: @@ -442,7 +442,7 @@ flag is not necessary if and only if all of the following hold: body p -In order to use built with use dependencies you must specify cEAPI=2/c. +In order to use built with use dependencies you must specify cEAPI=2/c. /p p
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/, ebuild-writing/variables/
commit: af8bf2fcb2fbfe68ba71d15bc0a204d51f7b6078 Author: Ulrich Müller ulm AT gentoo DOT org AuthorDate: Sat Nov 15 12:13:06 2014 + Commit: Ulrich Müller ulm AT gentoo DOT org CommitDate: Sat Nov 15 12:13:06 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=af8bf2fc Clarify that PDEPEND may be installed after the package in some cases. Bug 424117. --- ebuild-writing/variables/text.xml | 6 +++--- general-concepts/dependencies/text.xml | 10 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml index abe66ce..a31baa2 100644 --- a/ebuild-writing/variables/text.xml +++ b/ebuild-writing/variables/text.xml @@ -215,9 +215,9 @@ The following variables may or must be defined by every ebuild. tr ticPDEPEND/c/ti ti -A list of packages to be installed after the package -is merged. Should only be used where cRDEPEND/c is not -possible. See uri link=::general-concepts/dependencies/. +A list of packages to be installed (if possible) after the package +is merged. Use this only when cRDEPEND/c would cause cyclic +dependencies. See uri link=::general-concepts/dependencies/. /ti /tr tr diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index dc95e28..24b9902 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -56,10 +56,12 @@ Items which are in cRDEPEND/c but not cDEPEND/c could ein theory/e b body p -The cPDEPEND/c variable specifies dependencies which must be merged eafter/e the -package. This is sometimes used for plugins which have a dependency upon the -package being merged. Generally cPDEPEND/c should be avoided in favour of -cRDEPEND/c except where this will create circular dependency chains. +The cPDEPEND/c variable specifies dependencies that should be +merged eafter/e the package, but which may be merged at any time, +if the former is not possible. This is sometimes used for plugins +that have a dependency upon the package being merged. Generally +cPDEPEND/c should be avoided in favour of cRDEPEND/c except +where this will create circular dependency chains. /p /body
[gentoo-commits] proj/devmanual:master commit in: general-concepts/dependencies/
commit: 9f29f77794f9329b6f5f5e1e2478bbefad9a8b6a Author: Anthony Ryan anthonyryan1 AT gmail DOT com AuthorDate: Tue Aug 19 21:19:41 2014 + Commit: Markos Chandras hwoarang AT gentoo DOT org CommitDate: Sat Oct 18 17:40:13 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=9f29f777 Document use dependency defaults on this section of the devmanual --- general-concepts/dependencies/text.xml | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/general-concepts/dependencies/text.xml b/general-concepts/dependencies/text.xml index 8586db6..dc95e28 100644 --- a/general-concepts/dependencies/text.xml +++ b/general-concepts/dependencies/text.xml @@ -447,7 +447,6 @@ In order to use built with use dependencies you must specify cEAPI=2/c. Available specifiers are: /p -p table tr thSpecifier/th @@ -466,13 +465,11 @@ Available specifiers are: tifoo must have bar disabled and baz enabled./ti /tr /table -/p p There are also shortcuts for conditional situations: /p -p table tr thCompact form/th @@ -495,9 +492,25 @@ There are also shortcuts for conditional situations: ticbar? ( app-misc/foo[-bar] ) !bar? ( app-misc/foo[bar] )/c/ti /tr /table + +subsection +titleUse dependency defaults/title +body + +p +If a dependency is introducing or removing a cUSE/c flag in new versions, a use +dependency default may be used. Appending a c(+)/c or c(-)/c suffix will indicate +whether the absence of the flag from a particular version should indicate its +presence or absence. +/p +p +c=dev-libs/boost-1.48[threads(+)]/c will treat all versions without cthreads/c as having it set. /p /body +/subsection + +/body /section section