Commit bc123be2 authored by Martin Pitt's avatar Martin Pitt
Browse files

sysv-generator: Calculate proper dependencies for failing units

Thanks to Michael Biebl for the patch!

Closes: #771118
parent 49fc625e
......@@ -13,6 +13,8 @@ systemd (215-7) UNRELEASED; urgency=medium
- Extend boot-and-services autopkgtest to cover systemd-nspawn@.service.
* Cherry-pick upstream patch to fix SELinux unit access check (regression
in 215).
* sysv-generator: Avoid wrong dependencies for failing units. Thanks to
Michael Biebl for the patch! (Closes: #771118)
[ Jon Severinsson]
* Add /run/shm -> /dev/shm symlink in debian/tmpfiles.d/debian.conf. This
......
......@@ -159,3 +159,4 @@ sd-bus-Accept-no-sender-as-the-destination-field.patch
login-don-t-overmount-run-user-UID-on-upgrades.patch
udev-re-enable-mount-propagation-for-udevd.patch
Add-env-variable-for-machine-ID-path.patch
sysv-generator-Avoid-wrong-dependencies-for-failing-.patch
From: Michael Biebl <biebl@debian.org>
Date: Fri, 28 Nov 2014 06:04:48 +0100
Subject: sysv-generator: Avoid wrong dependencies for failing units
If a service fails to load, we skip fix_order(), which is results in the wrong
ordering. So instead, just don't add a service to the all_services hash_map, if
it fails to load.
Bug-Debian: https://bugs.debian.org/771118
---
src/sysv-generator/sysv-generator.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 677fac4..da6b4f6 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -768,6 +768,10 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
service->name = name;
service->path = fpath;
+ r = load_sysv(service);
+ if (r < 0)
+ continue;
+
r = hashmap_put(all_services, service->name, service);
if (r < 0)
return log_oom();
@@ -960,10 +964,6 @@ int main(int argc, char *argv[]) {
}
HASHMAP_FOREACH(service, all_services, j) {
- q = load_sysv(service);
- if (q < 0)
- continue;
-
q = fix_order(service, all_services);
if (q < 0)
continue;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment