SHA256
1
0
forked from pool/systemd
systemd/fix-lsb-provides.patch
Marcus Meissner e46422362e Accepting request 163593 from home:fcrozat:branches:Base:System
- Add improve-readahead-spinning.patch: improve readahead
  performance on spinning media with ext4.
- Add fix-journal-vacuum-logic.patch: fix vacuum logic in journal
  (bnc#789589).
- Add fix-lsb-provides.patch: ensure LSB provides are correctly
  handled if also referenced as dependencies (bnc#809646).
- Add fix-loopback-mount.patch: ensure udevd is started (and
  therefore static devices are created) before mounting
  (bnc#809820).
- Update systemd-sysv-convert to search services files in new
  location (bnc#809695).
- Add logind-nvidia-acl.diff: set ACL on nvidia devices
  (bnc#808319).
- Add do-no-isolate-on-fsck-failure.patch: do not turn off services
  if fsck fails (bnc#812874)
- Add wait-for-processes-killed.patch: wait for processes killed by
  SIGTERM before killing them with SIGKILL.
- Update systemctl-options.patch to only apply SYSTEMCTL_OPTIONS to
  systemctl command (bnc#801878).

OBS-URL: https://build.opensuse.org/request/show/163593
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=361
2013-04-11 10:11:09 +00:00

44 lines
1.7 KiB
Diff

From a99435109b83e7146a30ccf5387037b51c1fe907 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 21 Mar 2013 15:40:45 +0100
Subject: [PATCH] core: ensure LSB Provides are handled correctly
Let's say you have two initscripts, A and B:
A contains in its LSB header:
Required-Start: C
and B contains in its LSB header:
Provides: C
When systemd is parsing /etc/rc.d/, depending on the file order, you
can end up with either:
- B is parsed first. An unit "C.service" will be "created" and will be
added as additional name to B.service, with unit_add_name. No bug.
- A is parsed first. An unit "C.service" is created for the
"Required-Start" dependency (it will have no file attached, since
nothing provides this dependency yet). Then B is parsed and when trying
to handle "Provides: C", unit_add_name is called but will fail, because
"C.service" already exists in manager->units. Therefore, a merge should
occur for that case.
---
src/core/service.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/service.c b/src/core/service.c
index 4451d38..fa8a1cb 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -762,7 +762,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
continue;
if (unit_name_to_type(m) == UNIT_SERVICE)
- r = unit_add_name(u, m);
+ r = unit_merge_by_name(u, m);
else
/* NB: SysV targets
* which are provided
--
1.8.1.4