DistroBaker 29244e
From 5a80033676f331de2b0979fe7be9557279b6bff3 Mon Sep 17 00:00:00 2001
DistroBaker 29244e
Message-Id: <5a80033676f331de2b0979fe7be9557279b6bff3.1603865959.git.pmatilai@redhat.com>
DistroBaker 29244e
From: Panu Matilainen <pmatilai@redhat.com>
DistroBaker 29244e
Date: Wed, 28 Oct 2020 08:14:55 +0200
DistroBaker 29244e
Subject: [PATCH] Issue deprecation warning when creating BDB databases
DistroBaker 29244e
DistroBaker 29244e
---
DistroBaker 29244e
 lib/backend/db3.c | 4 ++++
DistroBaker 29244e
 1 file changed, 4 insertions(+)
DistroBaker 29244e
DistroBaker 29244e
diff --git a/lib/backend/db3.c b/lib/backend/db3.c
DistroBaker 29244e
index 68cfa6fb2..cb31676e7 100644
DistroBaker 29244e
--- a/lib/backend/db3.c
DistroBaker 29244e
+++ b/lib/backend/db3.c
DistroBaker 29244e
@@ -874,6 +874,10 @@ static int db3_dbiOpen(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flag
DistroBaker 29244e
 		oflags &= ~DB_RDONLY;
DistroBaker 29244e
 		dbtype = (rpmtag == RPMDBI_PACKAGES) ?  DB_HASH : DB_BTREE;
DistroBaker 29244e
 		retry_open--;
DistroBaker 29244e
+		if (rpmtag == RPMDBI_PACKAGES) {
DistroBaker 29244e
+		    rpmlog(RPMLOG_WARNING,
DistroBaker 29244e
+			    "using deprecated bdb database backend");
DistroBaker 29244e
+		}
DistroBaker 29244e
 	    } else {
DistroBaker 29244e
 		retry_open = 0;
DistroBaker 29244e
 	    }
DistroBaker 29244e
-- 
DistroBaker 29244e
2.28.0
DistroBaker 29244e