1 |
commit: ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 30 16:43:50 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 30 16:45:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad9f44ef |
7 |
|
8 |
sys-kernel/linux-firmware: rev bump to incorporate latest changes |
9 |
|
10 |
See changes for live ebuild for details. |
11 |
|
12 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
13 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
14 |
|
15 |
...r1.ebuild => linux-firmware-20201022-r2.ebuild} | 33 ++++++++++++++++------ |
16 |
1 file changed, 25 insertions(+), 8 deletions(-) |
17 |
|
18 |
diff --git a/sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild b/sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild |
19 |
similarity index 92% |
20 |
rename from sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild |
21 |
rename to sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild |
22 |
index fcd90451c74..63f85a38567 100644 |
23 |
--- a/sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild |
24 |
+++ b/sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild |
25 |
@@ -114,6 +114,13 @@ src_prepare() { |
26 |
fi |
27 |
fi |
28 |
|
29 |
+ # whitelist of misc files |
30 |
+ local misc_files=( |
31 |
+ copy-firmware.sh |
32 |
+ WHENCE |
33 |
+ README |
34 |
+ ) |
35 |
+ |
36 |
# whitelist of images with a free software license |
37 |
local free_software=( |
38 |
# keyspan_pda (GPL-2+) |
39 |
@@ -238,9 +245,16 @@ src_prepare() { |
40 |
# everything else is confirmed (or assumed) to be redistributable |
41 |
# based on upstream acceptance policy |
42 |
einfo "Removing non-redistributable files ..." |
43 |
- IFS=$'\n' find ! -type d -printf "%P\n" \ |
44 |
- | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \ |
45 |
- | xargs -d '\n' rm -v || die |
46 |
+ local OLDIFS="${IFS}" |
47 |
+ local IFS=$'\n' |
48 |
+ set -o pipefail |
49 |
+ find ! -type d -printf "%P\n" \ |
50 |
+ | grep -Fvx -e "${misc_files[*]}" -e "${free_software[*]}" -e "${unknown_license[*]}" \ |
51 |
+ | xargs -d '\n' --no-run-if-empty rm -v |
52 |
+ |
53 |
+ [[ ${?} -ne 0 ]] && die "Failed to remove non-redistributable files" |
54 |
+ |
55 |
+ IFS="${OLDIFS}" |
56 |
fi |
57 |
|
58 |
restore_config ${PN}.conf |
59 |
@@ -251,6 +265,10 @@ src_install() { |
60 |
|
61 |
pushd "${ED}/lib/firmware" &>/dev/null || die |
62 |
|
63 |
+ # especially use !redistributable will cause some broken symlinks |
64 |
+ einfo "Removing broken symlinks ..." |
65 |
+ find * -xtype l -print -delete || die |
66 |
+ |
67 |
if use savedconfig; then |
68 |
if [[ -s "${S}/${PN}.conf" ]]; then |
69 |
local files_to_keep="${T}/files_to_keep.lst" |
70 |
@@ -277,11 +295,10 @@ src_install() { |
71 |
die "Refusing to install an empty package" |
72 |
fi |
73 |
|
74 |
- if use savedconfig; then |
75 |
- echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die |
76 |
- find * ! -type d >> "${S}"/${PN}.conf || die |
77 |
- save_config "${S}"/${PN}.conf |
78 |
- fi |
79 |
+ # create config file |
80 |
+ echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die |
81 |
+ find * ! -type d >> "${S}"/${PN}.conf || die |
82 |
+ save_config "${S}"/${PN}.conf |
83 |
|
84 |
popd &>/dev/null || die |