File force-zyppnotify-to-prefer-packages.db-than-packages.patch of Package salt

From ef667793945ad49c39de2babe2d46275c6b3add7 Mon Sep 17 00:00:00 2001
From: Victor Zhestkov <vzhestkov@suse.com>
Date: Wed, 9 Dec 2020 14:58:55 +0300
Subject: [PATCH] Force zyppnotify to prefer Packages.db than Packages
 if it exists

---
 scripts/suse/zypper/plugins/commit/zyppnotify | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/suse/zypper/plugins/commit/zyppnotify b/scripts/suse/zypper/plugins/commit/zyppnotify
index b64badb119..17869aa733 100755
--- a/scripts/suse/zypper/plugins/commit/zyppnotify
+++ b/scripts/suse/zypper/plugins/commit/zyppnotify
@@ -19,7 +19,9 @@ class DriftDetector(Plugin):
     def __init__(self):
         Plugin.__init__(self)
         self.ck_path = "/var/cache/salt/minion/rpmdb.cookie"
-        self.rpm_path = "/var/lib/rpm/Packages"
+        self.rpm_path = "/var/lib/rpm/Packages.db"
+        if not os.path.exists(self.rpm_path):
+            self.rpm_path = "/var/lib/rpm/Packages"
 
     def _get_mtime(self):
         '''
-- 
2.29.2
openSUSE Build Service is sponsored by