File ndbrofs.diff of Package python-rpm.33599

--- lib/backend/ndb/glue.c.orig	2021-10-08 08:54:59.589691707 +0000
+++ lib/backend/ndb/glue.c	2021-10-08 08:55:41.429586586 +0000
@@ -158,7 +158,7 @@ static int ndb_Open(rpmdb rdb, rpmDbiTag
 	    /* Open indexes readwrite if possible */
 	    ioflags = O_RDWR;
 	    rc = rpmxdbOpen(&ndbenv->xdb, rdb->db_pkgs->dbi_db, path, ioflags, 0666);
-	    if (rc && errno == EACCES) {
+	    if (rc && (errno == EACCES || errno == EROFS)) {
 		/* If it is not asked for rw explicitly, try to open ro */
 		if (!(oflags & O_RDWR)) {
 		    ioflags = O_RDONLY;
openSUSE Build Service is sponsored by