chantra / rpms / rpm

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