commit: ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 30 16:43:50 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Oct 30 16:45:51 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad9f44ef
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 <AT> gentoo.org>
...r1.ebuild => linux-firmware-20201022-r2.ebuild} | 33 ++++++++++++++++------
1 file 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
similarity index 92%
rename from sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild
rename to sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild
index fcd90451c74..63f85a38567 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