mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
kernel-install.eclass: cleanup dead symlinks after removal
Since we remove /usr/src/linux-KV_FULL but by design keep the /lib/modules/KV_FULL, we end up with some dead symlinks after depcleaning a dist-kernel. This has the unfortunate side effect of tricking systemd's kernel-install into thinking that a kernel image for this kernel still exists. Which leads to some ugliness further down the line. We can easily resolve the problem by cleaning up these dead symlinks. Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
This commit is contained in:
@@ -808,6 +808,9 @@ kernel-install_pkg_postrm() {
|
||||
find "${kernel_dir}" -depth -type d -empty -delete
|
||||
eend ${?}
|
||||
fi
|
||||
|
||||
# Clean up dead symlinks
|
||||
find -L "${EROOT}/lib/modules/${KV_FULL}" -type l -delete
|
||||
}
|
||||
|
||||
# @FUNCTION: kernel-install_pkg_config
|
||||
|
||||
Reference in New Issue
Block a user