diff options
Diffstat (limited to 'sys-kernel/linux-firmware')
-rw-r--r-- | sys-kernel/linux-firmware/linux-firmware-99999999.ebuild | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index fcd90451c740..6a67500e679c 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -114,6 +114,13 @@ src_prepare() { fi fi + # whitelist of misc files + local misc_files=( + copy-firmware.sh + WHENCE + README + ) + # whitelist of images with a free software license local free_software=( # keyspan_pda (GPL-2+) @@ -238,9 +245,16 @@ src_prepare() { # everything else is confirmed (or assumed) to be redistributable # based on upstream acceptance policy einfo "Removing non-redistributable files ..." - IFS=$'\n' find ! -type d -printf "%P\n" \ - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \ - | xargs -d '\n' rm -v || die + local OLDIFS="${IFS}" + local IFS=$'\n' + set -o pipefail + find ! -type d -printf "%P\n" \ + | grep -Fvx -e "${misc_files[*]}" -e "${free_software[*]}" -e "${unknown_license[*]}" \ + | xargs -d '\n' --no-run-if-empty rm -v + + [[ ${?} -ne 0 ]] && die "Failed to remove non-redistributable files" + + IFS="${OLDIFS}" fi restore_config ${PN}.conf |