Summary: | sys-apps/portage-3.0.61-r1 fails test testUpdateDbentryDbapiTestCase | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jonathan Lovelace <kingjon3377> |
Component: | Current packages | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kingjon3377, zmedico |
Priority: | Normal | Keywords: | InVCS, PullRequest, TESTFAILURE |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/portage/pull/1282 https://bugs.gentoo.org/show_bug.cgi?id=920828 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 925214 | ||
Bug Blocks: | |||
Attachments: |
sys-apps:portage-3.0.61-r1:20240125-191309.log
emerge-info.txt |
Created attachment 883137 [details]
emerge-info.txt
The log shows a CorruptionKeyError triggered an unexpected TypeError from warnings.warn(e) here in the dbapi update_ents method:
> if metadata_updates:
> try:
> aux_update(cpv, metadata_updates)
> except (InvalidBinaryPackageFormat, CorruptionKeyError) as e:
> > warnings.warn(e)
> E TypeError: expected string or bytes-like object, got 'CorruptionKeyError'
Seems like this issue could introduce bug 920828 again but with TypeError instead of KeyError. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=0855821572f32e81b031a250f7491f34a2fd4078 commit 0855821572f32e81b031a250f7491f34a2fd4078 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-02-24 23:29:29 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-25 08:24:55 +0000 dbapi: Fix TypeError when passing Exception to warnings.warn If an Exception is passed as a message to warnings.warn then it triggers this TypeError: if metadata_updates: try: aux_update(cpv, metadata_updates) except (InvalidBinaryPackageFormat, CorruptionKeyError) as e: > warnings.warn(e) E TypeError: expected string or bytes-like object, got 'CorruptionKeyError' Fixes: fb1d0a22f657 ("dbapi: KeyError tolerance during package moves") Bug: https://bugs.gentoo.org/922935 Signed-off-by: Zac Medico <zmedico@gentoo.org> Closes: https://github.com/gentoo/portage/pull/1282 Signed-off-by: Sam James <sam@gentoo.org> lib/portage/dbapi/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad9d3103abc02f60d9e123ae21fa4a2e69b7e38 commit 6ad9d3103abc02f60d9e123ae21fa4a2e69b7e38 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-02-25 08:32:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-25 08:32:47 +0000 sys-apps/portage: add 3.0.63 Closes: https://bugs.gentoo.org/925214 Closes: https://bugs.gentoo.org/651018 Closes: https://bugs.gentoo.org/922935 Closes: https://bugs.gentoo.org/925240 Closes: https://bugs.gentoo.org/925311 Closes: https://bugs.gentoo.org/925333 Closes: https://bugs.gentoo.org/925350 Closes: https://bugs.gentoo.org/925456 Closes: https://bugs.gentoo.org/925460 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.63.ebuild | 246 +++++++++++++++++++++++++++++++++ 2 files changed, 247 insertions(+) |
Created attachment 883136 [details] sys-apps:portage-3.0.61-r1:20240125-191309.log =sys-apps/portage-3.0.61-r1 fails its test phase, specifically test_update_dbentry.py::UpdateDbentryTestCase::testUpdateDbentryDbapiTestCase in the pytest tests. The output from the tests is a bit long for this comment box, but the exception triggering it seems to be---in the "binpkg_format='xpak'" and "binpkg_format='gpkg'" instances of this test---a FileNotFoundError looking for a file under $T with a path ending "pkgdir/dev-libs/B-2.tbz2" or "pkgdir/dev-libs/B-2.gpkg.tar".