1 |
Assume that packages may have implicit dependencies on packages which |
2 |
belong to the @system set. This option is enabled by default. One of |
3 |
the effects of disabling this option is to allow the --jobs option |
4 |
to spawn jobs without accounting for the possiblity of implicit |
5 |
dependencies on packages that belong to the @system set (this causes |
6 |
the @system set to behave more like the @profile set). |
7 |
|
8 |
Bug: https://bugs.gentoo.org/681312 |
9 |
--- |
10 |
lib/_emerge/Scheduler.py | 4 ++++ |
11 |
lib/_emerge/create_depgraph_params.py | 4 ++++ |
12 |
lib/_emerge/depgraph.py | 7 ++++--- |
13 |
lib/_emerge/main.py | 6 ++++++ |
14 |
man/emerge.1 | 7 +++++++ |
15 |
5 files changed, 25 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py |
18 |
index 7fa3992e7..98eaf3bcc 100644 |
19 |
--- a/lib/_emerge/Scheduler.py |
20 |
+++ b/lib/_emerge/Scheduler.py |
21 |
@@ -499,6 +499,10 @@ class Scheduler(PollScheduler): |
22 |
added to the graph and traversed deeply (the depgraph "complete" |
23 |
parameter will do this, triggered by emerge --complete-graph option). |
24 |
""" |
25 |
+ params = create_depgraph_params(self.myopts, None) |
26 |
+ if not params["implicit_system_deps"]: |
27 |
+ return |
28 |
+ |
29 |
deep_system_deps = self._deep_system_deps |
30 |
deep_system_deps.clear() |
31 |
deep_system_deps.update( |
32 |
diff --git a/lib/_emerge/create_depgraph_params.py b/lib/_emerge/create_depgraph_params.py |
33 |
index 7d8da9065..81edcb9c0 100644 |
34 |
--- a/lib/_emerge/create_depgraph_params.py |
35 |
+++ b/lib/_emerge/create_depgraph_params.py |
36 |
@@ -32,6 +32,8 @@ def create_depgraph_params(myopts, myaction): |
37 |
# packages, so that they do not trigger dependency resolution |
38 |
# failures, or cause packages to be rebuilt or replaced. |
39 |
# ignore_world: ignore the @world package set and its dependencies |
40 |
+ # implicit_system_deps: Assume that packages may have implicit dependencies |
41 |
+ # on packages which belong to the @system set. |
42 |
# with_test_deps: pull in test deps for packages matched by arguments |
43 |
# changed_deps: rebuild installed packages with outdated deps |
44 |
# changed_deps_report: report installed packages with outdated deps |
45 |
@@ -87,6 +89,8 @@ def create_depgraph_params(myopts, myaction): |
46 |
if dynamic_deps: |
47 |
myparams["dynamic_deps"] = True |
48 |
|
49 |
+ myparams["implicit_system_deps"] = myopts.get("--implicit-system-deps", "y") != "n" |
50 |
+ |
51 |
if myaction == "remove": |
52 |
myparams["remove"] = True |
53 |
myparams["complete"] = True |
54 |
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py |
55 |
index f80b077bc..b6acf0b71 100644 |
56 |
--- a/lib/_emerge/depgraph.py |
57 |
+++ b/lib/_emerge/depgraph.py |
58 |
@@ -7399,6 +7399,8 @@ class depgraph(object): |
59 |
For optimal leaf node selection, promote deep system runtime deps and |
60 |
order nodes from highest to lowest overall reference count. |
61 |
""" |
62 |
+ if not self._dynamic_config.myparams["implicit_system_deps"]: |
63 |
+ return |
64 |
|
65 |
node_info = {} |
66 |
for node in mygraph.order: |
67 |
@@ -8043,10 +8045,9 @@ class depgraph(object): |
68 |
# by a normal replacement operation then abort. |
69 |
skip = False |
70 |
try: |
71 |
- for atom in root_config.sets[ |
72 |
- "system"].iterAtomsForPackage(task): |
73 |
+ if (self._dynamic_config.myparams["implicit_system_deps"] and |
74 |
+ any(root_config.sets["system"].iterAtomsForPackage(task))): |
75 |
skip = True |
76 |
- break |
77 |
except portage.exception.InvalidDependString as e: |
78 |
portage.writemsg("!!! Invalid PROVIDE in " + \ |
79 |
"'%svar/db/pkg/%s/PROVIDE': %s\n" % \ |
80 |
diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py |
81 |
index 8c72cdf9c..95855ef2d 100644 |
82 |
--- a/lib/_emerge/main.py |
83 |
+++ b/lib/_emerge/main.py |
84 |
@@ -525,6 +525,12 @@ def parse_opts(tmpcmdline, silent=False): |
85 |
"choices" : true_y_or_n |
86 |
}, |
87 |
|
88 |
+ "--implicit-system-deps": { |
89 |
+ "help": "Assume that packages may have implicit dependencies on" |
90 |
+ "packages which belong to the @system set", |
91 |
+ "choices": y_or_n |
92 |
+ }, |
93 |
+ |
94 |
"--jobs": { |
95 |
|
96 |
"shortopt" : "-j", |
97 |
diff --git a/man/emerge.1 b/man/emerge.1 |
98 |
index 8238515a6..df06c54c2 100644 |
99 |
--- a/man/emerge.1 |
100 |
+++ b/man/emerge.1 |
101 |
@@ -671,6 +671,13 @@ possible for it to make nonsensical changes which may lead to system |
102 |
breakage. Therefore, it is advisable to use \fB\-\-ask\fR together with |
103 |
this option. |
104 |
.TP |
105 |
+.BR "\-\-implicit\-system\-deps < y | n >" |
106 |
+Assume that packages may have implicit dependencies on packages which |
107 |
+belong to the @system set. This option is enabled by default. One of the |
108 |
+effects of disabling this option is to allow the \-\-jobs option to |
109 |
+spawn jobs without accounting for the possiblity of implicit dependencies |
110 |
+on packages that belong to the @system set. |
111 |
+.TP |
112 |
.BR \-j\ [JOBS] ", " \-\-jobs[=JOBS] |
113 |
Specifies the number of packages to build simultaneously. If this option is |
114 |
given without an argument, emerge will not limit the number of jobs that can |
115 |
-- |
116 |
2.21.0 |