diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-09 03:03:12 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-09 03:03:12 +0000 |
commit | 2be329ae14bbf99f0fc4de7567e2386bbb529fdc (patch) | |
tree | 99e1d21f40429392d5eb255ec008fdd96e4fa284 /sys-kernel/dracut/dracut-105-r1.ebuild | |
parent | 2cd9ff612e84f0c1ef63c9e9e13be53fe576cc2b (diff) |
Diffstat (limited to 'sys-kernel/dracut/dracut-105-r1.ebuild')
-rw-r--r-- | sys-kernel/dracut/dracut-105-r1.ebuild | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys-kernel/dracut/dracut-105-r1.ebuild b/sys-kernel/dracut/dracut-105-r1.ebuild index 19082b840ad0..70692cd367a4 100644 --- a/sys-kernel/dracut/dracut-105-r1.ebuild +++ b/sys-kernel/dracut/dracut-105-r1.ebuild @@ -158,17 +158,19 @@ src_install() { pkg_preinst() { # Remove directory/symlink conflicts # https://bugs.gentoo.org/943007 - local module backup + 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 - for backup in "${module}".backup.*; do - if [[ -L ${backup} ]]; then - rm -v "${backup}" || die - fi - done + local backups=( "${module}".backup.* ) + if [[ ${#backups[@]} -gt 0 ]]; then + rm -v "${backups[@]}" || die + fi done + eval "${save_nullglob}" } pkg_postinst() { |