From 4366a2bb0cac5655cad10a213cbda698c5f686a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 7 Sep 2022 13:06:10 +0200 Subject: [PATCH] Apply salt 60003 bug workaround for salt 3005 too Salt 3005 release includes partial fix for saltstack/salt#6003, but unfortunately it doesn't cover one corner case. Adjust the workaround to apply for a partially-fixed version too. This is a "backport" of a fix submitted upstream already. Fixes QubesOS/qubes-issues#6003 --- qubessalt/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qubessalt/__init__.py b/qubessalt/__init__.py index 37ec749..98c1cc4 100644 --- a/qubessalt/__init__.py +++ b/qubessalt/__init__.py @@ -155,6 +155,7 @@ def salt_call(self, command='state.highstate', return_output=False): salt_fixup = b""" if [ -e /etc/fedora-release ]; then sed -i -e 's/if cached_client is None:/if cached_client is None or cached_client.opts["cachedir"] != self.opts["cachedir"]:/' \\ + -e 's/not hasattr(cached_client, "opts")/\\0 or cached_client.opts["cachedir"] != self.opts["cachedir"]/' \\ /usr/lib/python3*/site-packages/salt/utils/jinja.py fi """