If package updates (renames etc) are interrupted, we sometimes end up with weird errors: ``` # emerge --sync [...] Performing Global Updates (Could take a couple of minutes if you have a lot of binary packages.) .='update pass' *='binary update' #='/var/db update' @='/var/db move' s='/var/db SLOT move' %='binary move' S='binary SLOT move' p='update /etc/portage/package.*' /var/db/repos/gentoo/profiles/updates/1Q-2024........................................................................................ /var/db/repos/gentoo/profiles/updates/4Q-2020........ /var/db/repos/gentoo/profiles/updates/4Q-2022.......... /var/db/repos/gentoo/profiles/updates/1Q-2020.......... /var/db/repos/gentoo/profiles/updates/1Q-2023....................... /var/db/repos/gentoo/profiles/updates/4Q-2023.......................................... /var/db/repos/gentoo/profiles/updates/2Q-2023............................... /var/db/repos/gentoo/profiles/updates/4Q-2021........................................................................ @!!! Cannot update binary: Destination exists. !!! sys-kernel/installkernel-gentoo-7 -> sys-kernel/installkernel-7 %@%@^C Exiting on signal 2 ``` # emaint all -f Error reading binpkg '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar': [Errno 22] Invalid argument!!! Invalid binary package: '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar', Error reading binpkg '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar': [Errno 22] Invalid argument Emaint: fix binhost [<=> ]Error reading binpkg '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar': [Errno 22] Invalid argument!!! Invalid binary package: '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar', Error reading binpkg '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar': [Errno 22] Invalid argument Emaint: fix binhost 100% [============================================>] Emaint: fix cleanconfmem 100% [============================================>] Emaint: fix cleanresume 100% [============================================>] 'sys-libs/glibc-2.35-r7' does not exist in the ebuild repository. Emaint: fix movebin [ <=> ]!!! Cannot update binary: Destination exists. !!! sys-kernel/installkernel-gentoo-7 -> sys-kernel/installkernel-7 Emaint: fix movebin [ <=> ``` (The missing newlines are a different problem.) We should probably block signals here given it's a critical point, although it's also quite slow, so maybe it's not a great idea?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=f070275fe05d5053c3756ebb5d0a602db8ba515d commit f070275fe05d5053c3756ebb5d0a602db8ba515d Author: Sam James <sam@gentoo.org> AuthorDate: 2024-02-28 15:48:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-28 15:49:16 +0000 binpkg: add another missing newline to error message ``` Error reading binpkg '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar': [Errno 22] Invalid argument!!! Invalid binary package: '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar', Error reading binpkg '/var/cache/binpkgs/dev-perl/SGMLSpm/SGMLSpm-1.1-r2-7.gpkg.tar': [Errno 22] Invalid argument ``` Bug: https://bugs.gentoo.org/925714 Signed-off-by: Sam James <sam@gentoo.org> lib/portage/binpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(In reply to Sam James from comment #0) > If package updates (renames etc) are interrupted, we sometimes end up with > weird errors: > > We should probably block signals here given it's a critical point, although > it's also quite slow, so maybe it's not a great idea? to be clear, I don't mind at all if we think this is a bad idea. It's just been on my mind so wanted to file something over it.