diff --git a/rust/src/composepost.rs b/rust/src/composepost.rs index 0ba09bbaf0..414f590595 100644 --- a/rust/src/composepost.rs +++ b/rust/src/composepost.rs @@ -274,6 +274,11 @@ fn postprocess_cleanup_rpmdb_impl(rootfs_dfd: &Dir) -> Result<()> { if matches!(name, ".dbenv.lock" | ".rpm.lock") || name.starts_with("__db.") { d.remove_file(name)?; } + // SQLite case. Today, it seems to work to remove the WAL, but removing the SHM + // file causes a runtime error as RPM tries to mutate a read-only database. + if matches!(name, "rpmdb.sqlite-shm" | "rpmdb.sqlite-wal") { + d.write(name, b"")?; + } } Ok(()) }