Skip to content

Commit 12147dd

Browse files
jleboncgwalters
authored andcommitted
composepost: Remove /usr/lib/sysimage/rpm dir before symlinking
Rawhide has moved the rpmdb to `/usr/lib/sysimage/rpm`, which is great! FCOS composes started breaking because rpm now creates that directory: #3397 We should be able to eventually flip our `_dbpath` macro with this (and eventually much later once it hits RHEL, stop overriding the macro at all). This will require some careful changes and testing. But anyway we probably don't want to do this yet on f35 to match Fedora, so we will want a transition mechanism; e.g. a `rpmdb-in-sysimage` treefile knob. For now just to unblock rawhide changes, let's remove the empty dir so we can symlink and keep `/usr/share/rpm` as canonical. We'll rework once we have the permanent solution.
1 parent 5d873c6 commit 12147dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/src/composepost.rs

+2
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,8 @@ fn hardlink_rpmdb_base_location(
981981

982982
// And write a symlink from the proposed standard /usr/lib/sysimage/rpm
983983
// to our /usr/share/rpm - eventually we will invert this.
984+
// Temporarily remove the directory if it exists until then.
985+
rootfs.remove_dir_optional(RPMOSTREE_SYSIMAGE_RPMDB)?;
984986
rootfs.symlink(RPMOSTREE_SYSIMAGE_RPMDB, "../../share/rpm")?;
985987

986988
Ok(true)

0 commit comments

Comments
 (0)