dcavalca / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone

Blame SOURCES/0001-Issue-deprecation-warning-when-creating-BDB-database.patch

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