summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-10-30 17:43:50 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-10-30 17:45:51 +0100
commitad9f44ef8ff4f98e3cfcfb2505856c39e532dc09 (patch)
tree4e6265637fe8f09742ff9a12035d5293723fc1f2 /sys-kernel
parentsys-kernel/linux-firmware: always create config file for USE=savedconfig (diff)
downloadgentoo-ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09.tar.gz
gentoo-ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09.tar.bz2
gentoo-ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09.zip
sys-kernel/linux-firmware: rev bump to incorporate latest changes
See changes for live ebuild for details. Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild (renamed from sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild)33
1 files changed, 25 insertions, 8 deletions
diff --git a/sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild b/sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild
index fcd90451c740..63f85a38567c 100644
--- a/sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild
+++ b/sys-kernel/linux-firmware/linux-firmware-20201022-r2.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
@@ -251,6 +265,10 @@ src_install() {
pushd "${ED}/lib/firmware" &>/dev/null || die
+ # especially use !redistributable will cause some broken symlinks
+ einfo "Removing broken symlinks ..."
+ find * -xtype l -print -delete || die
+
if use savedconfig; then
if [[ -s "${S}/${PN}.conf" ]]; then
local files_to_keep="${T}/files_to_keep.lst"
@@ -277,11 +295,10 @@ src_install() {
die "Refusing to install an empty package"
fi
- if use savedconfig; then
- echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die
- find * ! -type d >> "${S}"/${PN}.conf || die
- save_config "${S}"/${PN}.conf
- fi
+ # create config file
+ echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die
+ find * ! -type d >> "${S}"/${PN}.conf || die
+ save_config "${S}"/${PN}.conf
popd &>/dev/null || die