From 4ab107f43c799e6a8e4bf899cab8b99e08e267b0 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen <tla@rasmil.dk> Date: Tue, 29 Jun 2021 16:53:30 +0200 Subject: [PATCH] workaround for rpm path with escaped spaces --- python/dnfdaemon/server/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/dnfdaemon/server/__init__.py b/python/dnfdaemon/server/__init__.py index 0620546..38611c1 100644 --- a/python/dnfdaemon/server/__init__.py +++ b/python/dnfdaemon/server/__init__.py @@ -485,7 +485,12 @@ class DnfDaemonBase(dbus.service.Object, DownloadCallback): """Install packages from pkg-specs.""" value = 0 local_rpms = [] + # cmds can contain paths with escaped spaces + if '\\ ' in cmds: + cmds = cmds.replace('\\ ', '#') # replace escaped spaces for cmd in cmds.split(' '): + if "#" in cmd: + cmd = cmd.replace('#', ' ') # insert spaces again without '\\' if cmd.endswith('.rpm'): # install local .rpm local_rpms.append(cmd) else: -- GitLab