Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922935 - sys-apps/portage-3.0.61-r1 fails test testUpdateDbentryDbapiTestCase
Summary: sys-apps/portage-3.0.61-r1 fails test testUpdateDbentryDbapiTestCase
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, PullRequest, TESTFAILURE
Depends on: 925214
Blocks:
  Show dependency tree
 
Reported: 2024-01-26 01:59 UTC by Jonathan Lovelace
Modified: 2024-02-25 08:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-apps:portage-3.0.61-r1:20240125-191309.log (sys-apps:portage-3.0.61-r1:20240125-191309.log,207.60 KB, text/plain; charset=utf-8)
2024-01-26 01:59 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,8.71 KB, text/plain; charset=utf-8)
2024-01-26 02:00 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2024-01-26 01:59:31 UTC
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".
Comment 1 Jonathan Lovelace 2024-01-26 02:00:07 UTC
Created attachment 883137 [details]
emerge-info.txt
Comment 2 Zac Medico gentoo-dev 2024-02-24 20:50:51 UTC
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'
Comment 3 Zac Medico gentoo-dev 2024-02-24 23:37:21 UTC
Seems like this issue could introduce bug 920828 again but with TypeError instead of KeyError.
Comment 4 Larry the Git Cow gentoo-dev 2024-02-25 08:25:11 UTC
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(-)
Comment 5 Larry the Git Cow gentoo-dev 2024-02-25 08:33:00 UTC
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(+)