In src_install(): 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 When the first test [[ ${PIPESTATUS[0]} -ne 0 ]] succeeds, it will reset the whole array. So the subsequent two tests will never fail. (Presumably the live ebuild should be synced from the non-live one, where that pipe was removed some time ago.)
(In reply to Ulrich Müller from comment #0) > When the first test [[ ${PIPESTATUS[0]} -ne 0 ]] succeeds, it will reset the > whole array. So the subsequent two tests will never fail. Sorry, this wasn't quite accurate. Of course the command will always reset PIPESTATUS (which is only relevant when it doesn't die because of the first test).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1df2365983e9304c6482ba69d81b8675457a4566 commit 1df2365983e9304c6482ba69d81b8675457a4566 Author: Mike Pagano <mpagano@gentoo.org> AuthorDate: 2024-12-21 20:27:06 +0000 Commit: Mike Pagano <mpagano@gentoo.org> CommitDate: 2024-12-21 20:27:06 +0000 sys-kernel/linux-firmware: savedconfig fixes inline with non-git version Closes: https://bugs.gentoo.org/943848 Signed-off-by: Mike Pagano <mpagano@gentoo.org> .../linux-firmware/linux-firmware-99999999.ebuild | 36 ++++++++-------------- 1 file changed, 13 insertions(+), 23 deletions(-)