Created attachment 577376 [details, diff] sys-kernel/linux-firmware: Speed up src_prepare code. Building the list of files to remove in src_prepare() takes up to one minute on recent hardware, especially when the savedconfig file is fully populated. With more than 1800 files in the package, using a quadratic algorithm in bash is not such a good idea any more. I am attaching a patch for the live ebuild, but the snapshot should be updated as well, e.g., with the next version bump.
Just cosmetic, and related to the previous commit to this package for bug 686288, but would ebegin find [...] || die eend 0 not mess up output formatting? ebegin find [...] eend $? || die might preserve the output layout better. Either way it looks good to me. Feel free to commit.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83510840c1dfde65e806e405c64abec44b9095f4 commit 83510840c1dfde65e806e405c64abec44b9095f4 Author: Ulrich Müller <ulm@kph.uni-mainz.de> AuthorDate: 2019-05-20 08:53:39 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-05-20 21:31:15 +0000 sys-kernel/linux-firmware: Speed up src_prepare code. Building the list of files to remove could take up to one minute on recent hardware, because it used a quadratic algorithm in bash. Call grep instead, which is way faster. Acked-by: Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> Closes: https://bugs.gentoo.org/686376 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Ulrich Müller <ulm@gentoo.org> .../linux-firmware/linux-firmware-99999999.ebuild | 33 ++++++++-------------- 1 file changed, 11 insertions(+), 22 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f8617e27179037fda7c9e11fce910be165feccb commit 3f8617e27179037fda7c9e11fce910be165feccb Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2019-06-07 16:23:33 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-06-07 16:52:52 +0000 sys-kernel/linux-firmware: New snapshot. Update src_prepare to use the faster code from the live ebuild. Bug: https://bugs.gentoo.org/686376 Acked-by: Rick Farina <zerochaos@gentoo.org> Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Ulrich Müller <ulm@gentoo.org> sys-kernel/linux-firmware/Manifest | 1 + .../linux-firmware/linux-firmware-20190603.ebuild | 301 +++++++++++++++++++++ 2 files changed, 302 insertions(+)