Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666940 - sys-apps/portage: add portdbapi.async_xmatch method (asynchronous version of xmatch)
Summary: sys-apps/portage: add portdbapi.async_xmatch method (asynchronous version of ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 648790
Blocks: 666956
  Show dependency tree
 
Reported: 2018-09-24 03:03 UTC by Zac Medico
Modified: 2018-12-08 23:14 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2018-09-24 03:03:26 UTC
It's not possible to call portdbapi.xmatch in an asynchronous context, since the internal synchronous aux_get call would trigger event loop recursion. Therefore, an async_xmatch method is desirable.
Comment 2 Larry the Git Cow gentoo-dev 2018-09-24 07:30:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=ebd2c386f5ae2aced4c3ea05dacffdb99bd0bf5b

commit ebd2c386f5ae2aced4c3ea05dacffdb99bd0bf5b
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-09-24 03:04:13 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-09-24 06:45:32 +0000

    portdbapi: add async_xmatch method (bug 666940)
    
    Add an async_xmatch method, and use it to implement the synchronous
    xmatch method. Deprecate unused xmatch method parameters. Use the
    compat_coroutine decorator for backward compatibility with python2.7
    (via PEP 342 enhanced generators).
    
    Bug: https://bugs.gentoo.org/666940
    Suggested-by: Daniel Robbins <drobbins@funtoo.org>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dbapi/porttree.py | 60 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 49 insertions(+), 11 deletions(-)