Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675826 - sys-apps/portage: optimize INSTALL_MASK match with and index and minimize fnmatch calls
Summary: sys-apps/portage: optimize INSTALL_MASK match with and index and minimize fnm...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 671498
  Show dependency tree
 
Reported: 2019-01-19 06:37 UTC by Zac Medico
Modified: 2019-04-10 04:29 UTC (History)
0 users

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 2019-01-19 06:37:15 UTC
INSTALL_MASK patterns that are anchored by a leading / can be indexed in a tree structure, allowing the number of fnmatch calls to be minimized.
Comment 2 Larry the Git Cow gentoo-dev 2019-01-20 23:31:07 UTC
The bug has been referenced in the following commit(s):

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

commit eb2674c1c2d84b2c9e9923e1c1666cb7a596c36c
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-01-19 08:39:47 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-01-20 22:57:28 +0000

    INSTALL_MASK: index patterns anchored with leading slash (bug 675826)
    
    For scalability, use a tree structure to index patterns that are
    anchored with a leading slash.
    
    Patterns anchored with leading slash are indexed by leading non-glob
    components, making it possible to minimize the number of fnmatch
    calls. For example:
    
      /foo*/bar -> {'.': ['/foo*/bar']}
    
      /foo/bar* -> {'foo': {'.': ['/foo/bar*']}}
    
      /foo/bar/ -> {'foo': {'bar': {'.': ['/foo/bar/']}}}
    
    Bug: https://bugs.gentoo.org/675826
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/tests/util/test_install_mask.py | 36 +++++++++++++
 lib/portage/util/install_mask.py            | 84 ++++++++++++++++++++++++++---
 2 files changed, 113 insertions(+), 7 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2019-01-21 00:11:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d999af4a47bf55e53e54713d98d145f935935c1

commit 7d999af4a47bf55e53e54713d98d145f935935c1
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-01-21 00:01:42 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-01-21 00:08:55 +0000

    sys-apps/portage: version bump to 2.3.57
    
     #675756 emerge: compare new SLOT USE to installed SLOT
     #675826 INSTALL_MASK scalability: minimize fnmatch calls
     #675828 pid-sandbox: fix child process signal disposition
    
    Bug: https://bugs.gentoo.org/671498
    Bug: https://bugs.gentoo.org/675756
    Bug: https://bugs.gentoo.org/675826
    Bug: https://bugs.gentoo.org/675828
    Package-Manager: Portage-2.3.57, Repoman-2.3.12
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.57.ebuild | 271 +++++++++++++++++++++++++++++++++
 2 files changed, 272 insertions(+)
Comment 4 Zac Medico gentoo-dev 2019-04-10 04:29:10 UTC
Fixed in portage-2.3.62.