* [gentoo-commits] proj/portage:root-deps-both commit in: lib/_emerge/, lib/portage/tests/resolver/, man/, /
2024-06-11 15:25 [gentoo-commits] proj/portage:master commit in: man/, lib/portage/tests/resolver/, /, lib/_emerge/ James Le Cuirot
@ 2024-06-11 13:01 ` James Le Cuirot
0 siblings, 0 replies; 2+ messages in thread
From: James Le Cuirot @ 2024-06-11 13:01 UTC (permalink / raw
To: gentoo-commits
commit: e320d1eca24c036d3d08fdab14888269c3a05a59
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri May 10 11:26:18 2024 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 12:57:42 2024 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e320d1ec
emerge: Make --root-deps install build deps to ROOT plus / for all EAPIs
Rather than instead of / for EAPI 6 and below. This changes the
behaviour, but it is arguably not a breaking change, as no installations
are being dropped. The previous behaviour was highly likely to break
anyway.
Bug: https://bugs.gentoo.org/435066
Closes: https://github.com/gentoo/portage/pull/1319
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
NEWS | 8 ++++++++
lib/_emerge/depgraph.py | 24 ++++++++++++++++--------
lib/portage/tests/resolver/test_targetroot.py | 6 +++++-
man/emerge.1 | 20 +++++++-------------
4 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/NEWS b/NEWS
index 2dbe164617..5aa485d264 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,14 @@ Release notes take the form of the following optional categories:
* Bug fixes
* Cleanups
+portage-3.0.66 (UNRELEASED)
+--------------
+
+Features:
+* emerge: Make bare --root-deps option install build-time dependencies to ROOT
+ as well as / for all EAPIs rather than instead of / for EAPI 6 and below
+ (bug #435066).
+
portage-3.0.65 (2024-06-04)
--------------
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index a05404d9c2..2acd8f2e13 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -4040,16 +4040,24 @@ class depgraph:
if removal_action:
depend_root = myroot
else:
+ root_deps = self._frozen_config.myopts.get("--root-deps")
+
if eapi_attrs.bdepend:
depend_root = pkg.root_config.settings["ESYSROOT"]
else:
depend_root = self._frozen_config._running_root.root
- root_deps = self._frozen_config.myopts.get("--root-deps")
- if root_deps is not None:
- if root_deps is True:
- depend_root = myroot
- elif root_deps == "rdeps":
- ignore_depend_deps = True
+ if root_deps == "rdeps":
+ ignore_depend_deps = True
+
+ if root_deps == True:
+ edepend["RDEPEND"] += (
+ " "
+ + edepend["IDEPEND"]
+ + " "
+ + edepend["DEPEND"]
+ + " "
+ + edepend["BDEPEND"]
+ )
# If rebuild mode is not enabled, it's safe to discard ignored
# build-time dependencies. If you want these deps to be traversed
@@ -8391,7 +8399,7 @@ class depgraph:
for root in self._frozen_config.roots:
if root != self._frozen_config.target_root and (
"remove" in self._dynamic_config.myparams
- or self._frozen_config.myopts.get("--root-deps") is not None
+ or self._frozen_config.myopts.get("--root-deps") == "rdeps"
):
# Only pull in deps for the relevant root.
continue
@@ -8626,7 +8634,7 @@ class depgraph:
dep_keys = Package._runtime_keys
for myroot in self._frozen_config.trees:
if (
- self._frozen_config.myopts.get("--root-deps") is not None
+ self._frozen_config.myopts.get("--root-deps") == "rdeps"
and myroot != self._frozen_config.target_root
):
continue
diff --git a/lib/portage/tests/resolver/test_targetroot.py b/lib/portage/tests/resolver/test_targetroot.py
index 642a8b1505..8660313b3b 100644
--- a/lib/portage/tests/resolver/test_targetroot.py
+++ b/lib/portage/tests/resolver/test_targetroot.py
@@ -66,7 +66,11 @@ class TargetRootTestCase(TestCase):
ambiguous_merge_order=True,
success=True,
mergelist=[
- ("dev-libs/B-1{targetroot}", "dev-libs/C-1{targetroot}"),
+ (
+ "dev-libs/B-1",
+ "dev-libs/B-1{targetroot}",
+ "dev-libs/C-1{targetroot}",
+ ),
"dev-libs/A-1{targetroot}",
],
),
diff --git a/man/emerge.1 b/man/emerge.1
index 5c36dc1f0d..e30f5f813e 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -981,21 +981,15 @@ Set the \fBROOT\fR environment variable.
Set the \fBSYSROOT\fR environment variable.
.TP
.BR \-\-root\-deps[=rdeps]
-If no argument is given then build\-time dependencies of packages for
-\fBROOT\fR are installed to \fBROOT\fR instead of /.
-If the \fBrdeps\fR argument is given then discard all build\-time dependencies
-of packages for \fBROOT\fR.
-This option is only meaningful when used together with \fBROOT\fR and it should
-not be enabled under normal circumstances!
+This option is only meaningful when used together with \fBROOT\fR.
-Does not affect EAPIs that support \fBBDEPEND\fR. \fBEAPI 7\fR introduces
-\fBBDEPEND\fR as a means to adjust installation into / and \fBROOT\fR. Use
-the \fBSYSROOT\fR environment variable to control where \fBDEPEND\fR
-is installed to under \fBEAPI 7\fR.
+If no argument is given, then build\-time dependencies of packages for
+\fBROOT\fR are installed to \fBROOT\fR as well as /.
-When ebuilds with different EAPIs feature in the same emerge run, the
-appropriate behaviour for each EAPI is applied independently to each
-ebuild.
+If the \fBrdeps\fR argument is given, then all build\-time dependencies of
+packages for \fBROOT\fR are ignored entirely. This option should not be enabled
+under normal circumstances! It is not applied to ebuilds at \fBEAPI 7\fR or
+later.
.TP
.BR "\-\-search\-index < y | n >"
Enable or disable indexed search for search actions. This option is
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/portage:master commit in: man/, lib/portage/tests/resolver/, /, lib/_emerge/
@ 2024-06-11 15:25 James Le Cuirot
2024-06-11 13:01 ` [gentoo-commits] proj/portage:root-deps-both commit in: lib/_emerge/, lib/portage/tests/resolver/, man/, / James Le Cuirot
0 siblings, 1 reply; 2+ messages in thread
From: James Le Cuirot @ 2024-06-11 15:25 UTC (permalink / raw
To: gentoo-commits
commit: e320d1eca24c036d3d08fdab14888269c3a05a59
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri May 10 11:26:18 2024 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 12:57:42 2024 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e320d1ec
emerge: Make --root-deps install build deps to ROOT plus / for all EAPIs
Rather than instead of / for EAPI 6 and below. This changes the
behaviour, but it is arguably not a breaking change, as no installations
are being dropped. The previous behaviour was highly likely to break
anyway.
Bug: https://bugs.gentoo.org/435066
Closes: https://github.com/gentoo/portage/pull/1319
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
NEWS | 8 ++++++++
lib/_emerge/depgraph.py | 24 ++++++++++++++++--------
lib/portage/tests/resolver/test_targetroot.py | 6 +++++-
man/emerge.1 | 20 +++++++-------------
4 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/NEWS b/NEWS
index 2dbe164617..5aa485d264 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,14 @@ Release notes take the form of the following optional categories:
* Bug fixes
* Cleanups
+portage-3.0.66 (UNRELEASED)
+--------------
+
+Features:
+* emerge: Make bare --root-deps option install build-time dependencies to ROOT
+ as well as / for all EAPIs rather than instead of / for EAPI 6 and below
+ (bug #435066).
+
portage-3.0.65 (2024-06-04)
--------------
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index a05404d9c2..2acd8f2e13 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -4040,16 +4040,24 @@ class depgraph:
if removal_action:
depend_root = myroot
else:
+ root_deps = self._frozen_config.myopts.get("--root-deps")
+
if eapi_attrs.bdepend:
depend_root = pkg.root_config.settings["ESYSROOT"]
else:
depend_root = self._frozen_config._running_root.root
- root_deps = self._frozen_config.myopts.get("--root-deps")
- if root_deps is not None:
- if root_deps is True:
- depend_root = myroot
- elif root_deps == "rdeps":
- ignore_depend_deps = True
+ if root_deps == "rdeps":
+ ignore_depend_deps = True
+
+ if root_deps == True:
+ edepend["RDEPEND"] += (
+ " "
+ + edepend["IDEPEND"]
+ + " "
+ + edepend["DEPEND"]
+ + " "
+ + edepend["BDEPEND"]
+ )
# If rebuild mode is not enabled, it's safe to discard ignored
# build-time dependencies. If you want these deps to be traversed
@@ -8391,7 +8399,7 @@ class depgraph:
for root in self._frozen_config.roots:
if root != self._frozen_config.target_root and (
"remove" in self._dynamic_config.myparams
- or self._frozen_config.myopts.get("--root-deps") is not None
+ or self._frozen_config.myopts.get("--root-deps") == "rdeps"
):
# Only pull in deps for the relevant root.
continue
@@ -8626,7 +8634,7 @@ class depgraph:
dep_keys = Package._runtime_keys
for myroot in self._frozen_config.trees:
if (
- self._frozen_config.myopts.get("--root-deps") is not None
+ self._frozen_config.myopts.get("--root-deps") == "rdeps"
and myroot != self._frozen_config.target_root
):
continue
diff --git a/lib/portage/tests/resolver/test_targetroot.py b/lib/portage/tests/resolver/test_targetroot.py
index 642a8b1505..8660313b3b 100644
--- a/lib/portage/tests/resolver/test_targetroot.py
+++ b/lib/portage/tests/resolver/test_targetroot.py
@@ -66,7 +66,11 @@ class TargetRootTestCase(TestCase):
ambiguous_merge_order=True,
success=True,
mergelist=[
- ("dev-libs/B-1{targetroot}", "dev-libs/C-1{targetroot}"),
+ (
+ "dev-libs/B-1",
+ "dev-libs/B-1{targetroot}",
+ "dev-libs/C-1{targetroot}",
+ ),
"dev-libs/A-1{targetroot}",
],
),
diff --git a/man/emerge.1 b/man/emerge.1
index 5c36dc1f0d..e30f5f813e 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -981,21 +981,15 @@ Set the \fBROOT\fR environment variable.
Set the \fBSYSROOT\fR environment variable.
.TP
.BR \-\-root\-deps[=rdeps]
-If no argument is given then build\-time dependencies of packages for
-\fBROOT\fR are installed to \fBROOT\fR instead of /.
-If the \fBrdeps\fR argument is given then discard all build\-time dependencies
-of packages for \fBROOT\fR.
-This option is only meaningful when used together with \fBROOT\fR and it should
-not be enabled under normal circumstances!
+This option is only meaningful when used together with \fBROOT\fR.
-Does not affect EAPIs that support \fBBDEPEND\fR. \fBEAPI 7\fR introduces
-\fBBDEPEND\fR as a means to adjust installation into / and \fBROOT\fR. Use
-the \fBSYSROOT\fR environment variable to control where \fBDEPEND\fR
-is installed to under \fBEAPI 7\fR.
+If no argument is given, then build\-time dependencies of packages for
+\fBROOT\fR are installed to \fBROOT\fR as well as /.
-When ebuilds with different EAPIs feature in the same emerge run, the
-appropriate behaviour for each EAPI is applied independently to each
-ebuild.
+If the \fBrdeps\fR argument is given, then all build\-time dependencies of
+packages for \fBROOT\fR are ignored entirely. This option should not be enabled
+under normal circumstances! It is not applied to ebuilds at \fBEAPI 7\fR or
+later.
.TP
.BR "\-\-search\-index < y | n >"
Enable or disable indexed search for search actions. This option is
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-11 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 15:25 [gentoo-commits] proj/portage:master commit in: man/, lib/portage/tests/resolver/, /, lib/_emerge/ James Le Cuirot
2024-06-11 13:01 ` [gentoo-commits] proj/portage:root-deps-both commit in: lib/_emerge/, lib/portage/tests/resolver/, man/, / James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox