sys-kernel/dracut: fix up conflicting directories/symlinks in 9999

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert
2024-11-11 11:48:24 -05:00
parent af2bdb27d4
commit 3fb0a933f2

View File

@@ -153,6 +153,24 @@ src_install() {
dodoc dracut.html
}
pkg_preinst() {
# Remove directory/symlink conflicts
# https://bugs.gentoo.org/943007
local save_nullglob=$(shopt -p nullglob)
shopt -s nullglob
local module
for module in "${EROOT}"/usr/lib/dracut/modules.d/{80test,80test-makeroot,80test-root}; do
if [[ ! -L ${module} && -d ${module} ]]; then
rm -rv "${module}" || die
fi
local backups=( "${module}".backup.* )
if [[ ${#backups[@]} -gt 0 ]]; then
rm -v "${backups[@]}" || die
fi
done
eval "${save_nullglob}"
}
pkg_postinst() {
optfeature "Networking support" net-misc/networkmanager
optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \