From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D40E515812D for ; Sat, 21 Dec 2024 20:29:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8452E0940; Sat, 21 Dec 2024 20:29:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 203C9E0940 for ; Sat, 21 Dec 2024 20:29:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04E1033BF29 for ; Sat, 21 Dec 2024 20:29:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8C240EB9 for ; Sat, 21 Dec 2024 20:29:03 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1734812826.1df2365983e9304c6482ba69d81b8675457a4566.mpagano@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-firmware/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/linux-firmware/linux-firmware-99999999.ebuild X-VCS-Directories: sys-kernel/linux-firmware/ X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 1df2365983e9304c6482ba69d81b8675457a4566 X-VCS-Branch: master Date: Sat, 21 Dec 2024 20:29:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 27798efa-5a84-444e-b585-f8e0ea194fc8 X-Archives-Hash: 72e34b190da679534f4ce4a194089001 commit: 1df2365983e9304c6482ba69d81b8675457a4566 Author: Mike Pagano gentoo org> AuthorDate: Sat Dec 21 20:27:06 2024 +0000 Commit: Mike Pagano gentoo org> CommitDate: Sat Dec 21 20:27:06 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1df23659 sys-kernel/linux-firmware: savedconfig fixes inline with non-git version Closes: https://bugs.gentoo.org/943848 Signed-off-by: Mike Pagano gentoo.org> .../linux-firmware/linux-firmware-99999999.ebuild | 36 ++++++++-------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index f49e8118b8be..a563075cac21 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -72,6 +72,9 @@ IDEPEND=" " QA_PREBUILT="*" +PATCHES=( + "${FILESDIR}"/${PN}-copy-firmware-r7.patch +) pkg_pretend() { if use initramfs; then @@ -231,6 +234,16 @@ src_install() { local FW_OPTIONS=( "-v" ) git config --global --add safe.directory "${S}" || die + local files_to_keep= + + if use savedconfig; then + if [[ -s "${S}/${PN}.conf" ]]; then + files_to_keep="${T}/files_to_keep.lst" + grep -v '^#' "${S}/${PN}.conf" 2>/dev/null > "${files_to_keep}" || die + [[ -s "${files_to_keep}" ]] || die "grep failed, empty config file?" + FW_OPTIONS+=( "--firmware-list" "${files_to_keep}" ) + fi + fi if use compress-xz; then FW_OPTIONS+=( "--xz" ) @@ -296,29 +309,6 @@ src_install() { 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" - grep -v '^#' "${S}/${PN}.conf" 2>/dev/null > "${files_to_keep}" || die - [[ -s "${files_to_keep}" ]] || die "grep failed, empty config file?" - - einfo "Applying USE=savedconfig; Removing all files not listed in config ..." - find ! -type d -printf "%P\n" \ - | grep -Fvx -f "${files_to_keep}" \ - | xargs -d '\n' --no-run-if-empty rm -v - - if [[ ${PIPESTATUS[0]} -ne 0 ]]; then - die "Find failed to print installed files" - elif [[ ${PIPESTATUS[1]} -eq 2 ]]; then - # grep returns exit status 1 if no lines were selected - # which is the case when we want to keep all files - die "Grep failed to select files to keep" - elif [[ ${PIPESTATUS[2]} -ne 0 ]]; then - die "Failed to remove files not listed in config" - fi - fi - fi - # remove empty directories, bug #396073 find -type d -empty -delete || die