blob: 21b50dee014973a0b5cbc94167365b5819f4245c [file] [log] [blame]
Andrew Geissler4b740dc2020-05-05 08:54:39 -05001From 5e07c16a506b19cbb107d5e99fca41d679b23b9a Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 28 Apr 2020 15:55:00 +0200
4Subject: [PATCH] dnf: write the log lock to root
5
6Writing it to /var/log appears to be racing with installation
7of base-files, and if lock is created first, base-files
8will refuse to install (due to the target directory
9already existing, and base-files creating it as a symlink).
10
11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 dnf/logging.py | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/dnf/logging.py b/dnf/logging.py
18index bd660470..a9d808b1 100644
19--- a/dnf/logging.py
20+++ b/dnf/logging.py
21@@ -94,7 +94,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler):
22 def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False):
23 super(MultiprocessRotatingFileHandler, self).__init__(
24 filename, mode, maxBytes, backupCount, encoding, delay)
25- self.rotate_lock = dnf.lock.build_log_lock("/var/log/", True)
26+ self.rotate_lock = dnf.lock.build_log_lock("/", True)
27
28 def emit(self, record):
29 while True: