>>> Emerging (1 of 5) sys-kernel/linux-firmware-20190514::gentoo * Fetching files in the background. * To view fetch progress, run in another terminal: * tail -f /var/log/emerge-fetch.log * waiting for lock on /aches/gentoo/distfiles/.linux-firmware-20190514.tar.gz.portage_lockfile ... [ ok ] * linux-firmware-20190514.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking linux-firmware-20190514.tar.gz to /home/portage/sys-kernel/linux-firmware-20190514/work >>> Source unpacked in /home/portage/sys-kernel/linux-firmware-20190514/work >>> Preparing source in /home/portage/sys-kernel/linux-firmware-20190514/work/linux-firmware-20190514 ... * Checking existence of //etc/portage/savedconfig/sys-kernel/linux-firmware-20190514 ... * Checking existence of //etc/portage/savedconfig/sys-kernel/linux-firmware-20190514 ... * Checking existence of //etc/portage/savedconfig/sys-kernel/linux-firmware ... * No saved config to restore - please remove USE=savedconfig or * provide a configuration file in //etc/portage/savedconfig/sys-kernel/linux-firmware * Your config file(s) will not be used this time rm: cannot remove '': No such file or directory * ERROR: sys-kernel/linux-firmware-20190514::gentoo failed (prepare phase): * (no error message) * * Call stack: * ebuild.sh, line 124: Called src_prepare * environment, line 743: Called die * The specific snippet of code: * printf "%s" "${remove[@]}" | xargs -0 --no-run-if-empty rm || die; [ebuild U ~] sys-kernel/linux-firmware-20190514::gentoo [20190502::gentoo] USE="redistributable%* savedconfig (-unknown-license)" 0 KiB
Looks like a bootstrapping issue. When you install sys-kernel/linux-firmware-20190514 with USE=savedconfig for the first time, restore_config does not have a file to restore, so the rest of the logic then starts failing badly. You can only get the configuration saved during the first install, but the ebuild fails before that ever happens.
--- a/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild @@ -259,7 +259,10 @@ src_prepare() { while IFS= read -d "" -r file; do has "${file}" "${preserved_files[@]}" || remove+=("${file}") done < <(find * ! -type d ! -name ${PN}.conf -print0 || die) - printf "%s\0" "${remove[@]}" | xargs -0 --no-run-if-empty rm || die + + if [[ -n "${remove[@]}" ]]; then + printf "%s\0" "${remove[@]}" | xargs -0 --no-run-if-empty rm || die + fi fi # remove empty directories, bug #396073
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0baeda7ca327b256ce34b40965640cebb8080f95 commit 0baeda7ca327b256ce34b40965640cebb8080f95 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2019-05-19 09:37:27 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-05-19 09:38:52 +0000 sys-kernel/linux-firmware: Explicitly check for empty removal list. Closes: https://bugs.gentoo.org/686288 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Ulrich Müller <ulm@gentoo.org> sys-kernel/linux-firmware/linux-firmware-20190514.ebuild | 6 +++++- sys-kernel/linux-firmware/linux-firmware-99999999.ebuild | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)
*** Bug 686330 has been marked as a duplicate of this bug. ***