- Add 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch until
https://github.com/systemd/systemd/issues/26839 is fixed properly. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1358
This commit is contained in:
parent
5e40dcaa5e
commit
53f4c09eaa
@ -0,0 +1,75 @@
|
||||
From 7e094b534978a8c5e980271a00ebccdba98ae6f7 Mon Sep 17 00:00:00 2001
|
||||
From: Franck Bui <fbui@suse.com>
|
||||
Date: Wed, 15 Mar 2023 19:48:52 +0100
|
||||
Subject: [PATCH 5001/5001] Revert "core: propagate stop too if restart is
|
||||
issued"
|
||||
|
||||
This reverts commit 017a7ba4f406adcf69d6b3ec15b9f2d9ed5ad853.
|
||||
|
||||
Until https://github.com/systemd/systemd/issues/26839 is properly fixed.
|
||||
---
|
||||
src/core/transaction.c | 42 +++++++++++++++---------------------------
|
||||
1 file changed, 15 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/src/core/transaction.c b/src/core/transaction.c
|
||||
index a6fd184e33..9689d5faab 100644
|
||||
--- a/src/core/transaction.c
|
||||
+++ b/src/core/transaction.c
|
||||
@@ -1047,39 +1047,27 @@ int transaction_add_job_and_dependencies(
|
||||
}
|
||||
|
||||
if (IN_SET(type, JOB_STOP, JOB_RESTART)) {
|
||||
- _cleanup_set_free_ Set *propagated_restart = NULL;
|
||||
+ UnitDependencyAtom atom;
|
||||
+ JobType ptype;
|
||||
+
|
||||
/* We propagate STOP as STOP, but RESTART only as TRY_RESTART, in order not to start
|
||||
* dependencies that are not around. */
|
||||
+ if (type == JOB_RESTART) {
|
||||
+ atom = UNIT_ATOM_PROPAGATE_RESTART;
|
||||
+ ptype = JOB_TRY_RESTART;
|
||||
+ } else {
|
||||
+ ptype = JOB_STOP;
|
||||
+ atom = UNIT_ATOM_PROPAGATE_STOP;
|
||||
+ }
|
||||
|
||||
- if (type == JOB_RESTART)
|
||||
- UNIT_FOREACH_DEPENDENCY(dep, ret->unit, UNIT_ATOM_PROPAGATE_RESTART) {
|
||||
- JobType nt;
|
||||
-
|
||||
- r = set_ensure_put(&propagated_restart, NULL, dep);
|
||||
- if (r < 0)
|
||||
- return r;
|
||||
-
|
||||
- nt = job_type_collapse(JOB_TRY_RESTART, dep);
|
||||
- if (nt == JOB_NOP)
|
||||
- continue;
|
||||
-
|
||||
- r = transaction_add_job_and_dependencies(tr, nt, dep, ret, true, false, false, ignore_order, e);
|
||||
- if (r < 0) {
|
||||
- if (r != -EBADR) /* job type not applicable */
|
||||
- return r;
|
||||
-
|
||||
- sd_bus_error_free(e);
|
||||
- }
|
||||
- }
|
||||
+ UNIT_FOREACH_DEPENDENCY(dep, ret->unit, atom) {
|
||||
+ JobType nt;
|
||||
|
||||
- /* The 'stop' part of a restart job is also propagated to
|
||||
- * units with UNIT_ATOM_PROPAGATE_STOP */
|
||||
- UNIT_FOREACH_DEPENDENCY(dep, ret->unit, UNIT_ATOM_PROPAGATE_STOP) {
|
||||
- /* Units experienced restart propagation are skipped */
|
||||
- if (set_contains(propagated_restart, dep))
|
||||
+ nt = job_type_collapse(ptype, dep);
|
||||
+ if (nt == JOB_NOP)
|
||||
continue;
|
||||
|
||||
- r = transaction_add_job_and_dependencies(tr, JOB_STOP, dep, ret, true, false, false, ignore_order, e);
|
||||
+ r = transaction_add_job_and_dependencies(tr, nt, dep, ret, true, false, false, ignore_order, e);
|
||||
if (r < 0) {
|
||||
if (r != -EBADR) /* job type not applicable */
|
||||
return r;
|
||||
--
|
||||
2.35.3
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 16 07:29:24 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- Add 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch until
|
||||
https://github.com/systemd/systemd/issues/26839 is fixed properly.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 13 18:50:39 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
@ -213,6 +213,7 @@ Patch12: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
|
||||
# worked around quickly. In these cases, the patches are added temporarily and
|
||||
# will be removed as soon as a proper fix will be merged by upstream.
|
||||
Patch5000: 5000-core-manager-run-generators-directly-when-we-are-in-.patch
|
||||
Patch5001: 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
|
Loading…
Reference in New Issue
Block a user