[Rpm-maint] [rpm-software-management/rpm] Allow database probing if _db_backend is not set (#1451)

Michael Schroeder notifications at github.com
Mon Dec 7 11:32:17 UTC 2020


@mlschroe commented on this pull request.



> @@ -77,7 +78,7 @@ dbDetectBackend(rpmdb rdb)
 	}
     }
 
-    if (!cfg) {
+    if (!cfg && ((rdb->db_mode & O_ACCMODE) != O_RDONLY || (rdb->db_flags & RPMDB_FLAG_REBUILD) != 0)) {

It will no longer crash, but it's still wrong. IMHO it's better to error out early when opening the old database in rebuilddb mode instead of later when opening the new database.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1451#discussion_r537434885
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201207/3b8b49f4/attachment.html>


More information about the Rpm-maint mailing list