- allow opening the rpm database with an unset db_backend

* new patch: empty_dbbackend.diff

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=562
This commit is contained in:
Michael Schröder 2020-11-18 09:48:16 +00:00 committed by Git OBS Bridge
parent e84d0febf7
commit 5a0ee5d891
3 changed files with 28 additions and 1 deletions

20
empty_dbbackend.diff Normal file
View File

@ -0,0 +1,20 @@
--- ./lib/backend/dbi.c.orig 2020-11-18 09:37:08.314743771 +0000
+++ ./lib/backend/dbi.c 2020-11-18 09:42:34.025792074 +0000
@@ -77,7 +77,7 @@ dbDetectBackend(rpmdb rdb)
}
}
- if (!cfg) {
+ if (!cfg && (rdb->db_flags & RPMDB_FLAG_REBUILD) != 0) {
rpmlog(RPMLOG_WARNING, _("invalid %%_db_backend: %s\n"), db_backend);
goto exit;
}
@@ -97,7 +97,7 @@ dbDetectBackend(rpmdb rdb)
rpmlog(RPMLOG_WARNING,
_("Converting database from %s to %s backend\n"),
ondisk->name, cfg->name);
- } else {
+ } else if (*db_backend) {
rpmlog(RPMLOG_WARNING,
_("Found %s %s database while attempting %s backend: "
"using %s backend.\n"),

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 18 10:46:03 CET 2020 - mls@suse.de
- allow opening the rpm database with an unset db_backend
* new patch: empty_dbbackend.diff
-------------------------------------------------------------------
Tue Oct 27 10:08:05 CET 2020 - Callum Farmer <callumjfarmer13@gmail.com>

View File

@ -127,6 +127,7 @@ Patch117: findsupplements.diff
Patch122: db_conversion.diff
Patch123: nextiteratorheaderblob.diff
Patch127: finddebuginfo-check-res-file.patch
Patch128: empty_dbbackend.diff
Patch6464: auto-config-update-aarch64-ppc64le.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -251,7 +252,7 @@ cp config.guess config.sub db/dist/
%patch -P 93 -P 94 -P 99
%patch -P 100 -P 102 -P 103
%patch -P 109 -P 117
%patch -P 122 -P 123 -P 127
%patch -P 122 -P 123 -P 127 -P 128
%ifarch aarch64 ppc64le riscv64
%patch6464