diff --git a/empty_dbbackend.diff b/empty_dbbackend.diff new file mode 100644 index 0000000..12e3175 --- /dev/null +++ b/empty_dbbackend.diff @@ -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"), diff --git a/rpm.changes b/rpm.changes index 24879ca..b866450 100644 --- a/rpm.changes +++ b/rpm.changes @@ -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 diff --git a/rpm.spec b/rpm.spec index 10f13c7..1b64d32 100644 --- a/rpm.spec +++ b/rpm.spec @@ -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