]> git.pld-linux.org Git - packages/systemd.git/commitdiff
Patch to fix the 'Overwriting existing symlink' auto/th/systemd-219-1.1
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 14 May 2015 07:33:00 +0000 (09:33 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 14 May 2015 07:35:55 +0000 (09:35 +0200)
This should fix the annoying warnings in journal.

http://cgit.freedesktop.org/systemd/systemd/commit/?id=4e558983

Release: 1.1

systemd.spec
sysv-symlinks-warning.patch [new file with mode: 0644]

index f01193763ccb12e8754aac7a5129e676d4ca3aae..15e1a6ac075f9f07ab62ead04a923c2b91775809 100644 (file)
@@ -25,7 +25,7 @@ Summary(pl.UTF-8):    systemd - zarządca systemu i usług dla Linuksa
 Name:          systemd
 # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
 Version:       219
-Release:       1
+Release:       1.1
 Epoch:         1
 License:       GPL v2+ (udev), LGPL v2.1+ (the rest)
 Group:         Base
@@ -71,6 +71,7 @@ Patch16:      systemd-configfs.patch
 Patch17:       pld-boot_efi_mount.patch
 Patch18:       optional-tmp-on-tmpfs.patch
 Patch19:       uids_gids.patch
+Patch20:       sysv-symlinks-warning.patch
 URL:           http://www.freedesktop.org/wiki/Software/systemd
 BuildRequires: acl-devel
 BuildRequires: attr-devel
@@ -684,6 +685,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
 %patch17 -p1
 %patch18 -p1
 %patch19 -p1
+%patch20 -p1
 cp -p %{SOURCE2} src/systemd_booted.c
 
 %build
diff --git a/sysv-symlinks-warning.patch b/sysv-symlinks-warning.patch
new file mode 100644 (file)
index 0000000..77a02bf
--- /dev/null
@@ -0,0 +1,28 @@
+
+based on:
+
+From 4e5589836c9e143796c3f3d81e67ab7a9209e2b0 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu, 19 Feb 2015 11:06:24 +0100
+Subject: sysv-generator: fix wrong "Overwriting existing symlink" warnings
+
+Fix result testing of is_symlink() to ignore negative results, which happen if
+the file name does not exist at all. In this case we do not want a warning and
+unlink the non-existing link.
+
+https://bugs.debian.org/778700
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index 2091854..bd67f32 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -166,7 +166,7 @@ static int generate_unit_file(SysvStub *s) {
+         /* We might already have a symlink with the same name from a Provides:,
+          * or from backup files like /etc/init.d/foo.bak. Real scripts always win,
+          * so remove an existing link */
+-        if (is_symlink(unit)) {
++        if (is_symlink(unit) > 0) {
+                 log_warning("Overwriting existing symlink %s with real service", unit);
+                 (void) unlink(unit);
+         }
+
This page took 0.950133 seconds and 4 git commands to generate.