rpm/empty_dbbackend.diff

21 lines
675 B
Diff

--- ./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"),