Skip to content

Commit

Permalink
sys-kernel/linux-firmware: rev bump to incorporate latest changes
Browse files Browse the repository at this point in the history
See changes for live ebuild for details.

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
Whissi committed Oct 30, 2020
1 parent 2e61b02 commit ad9f44e
Showing 1 changed file with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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+)
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit ad9f44e

Please sign in to comment.