CBL-Mariner/SPECS/filesystem
Christopher Co bd35faa646
fix: add scriptlet to workaround rpm transaction limitation to update /media symlink to directory (#6950)
Prior to filesystem-1.1-16, /media used to be a symlink to /run/media but this was
replaced with a directory. The RPM upgrade operation generally worked when the /media
symlink is a dangling link, which is commonly the case, however not always the case.

And when the /media symlink is indeed properly pointing to a real /run/media, RPM has a
known limitation where it is not possible to replace an active symlink with a directory,
and thus the RPM transation fails.

To workaround this, a %pretrans scriptlet must run to test and remove the symlink
before RPM attempts to install the new directory.

https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement

Fixes: e2d3d55ce1 ("fix: make /media a directory")

Signed-off-by: Chris Co <chrco@microsoft.com>
2023-12-11 15:26:04 -08:00
..
filesystem.spec fix: add scriptlet to workaround rpm transaction limitation to update /media symlink to directory (#6950) 2023-12-11 15:26:04 -08:00