Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649806 - sys-apps/portage: fix config class to cache profile.bashrc stat results
Summary: sys-apps/portage: fix config class to cache profile.bashrc stat results
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 835380 659322
  Show dependency tree
Reported: 2018-03-06 23:11 UTC by Zac Medico
Modified: 2023-05-20 05:11 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2018-03-06 23:11:25 UTC
The profile.bashrc stat calls are repeated for every setcpv call here:

We can easily perform the stat calls in the constructor, and save the results in an attribute, like when we initialize self._pbashrcdict.

Reported-by: Joakim Tjernlund <>
Comment 2 Larry the Git Cow gentoo-dev 2018-07-15 21:54:08 UTC
The bug has been referenced in the following commit(s):

commit 2de6ba26fd45fe942329ac928029e4edf603e125
Author:     Zac Medico <>
AuthorDate: 2018-07-15 04:54:45 +0000
Commit:     Zac Medico <>
CommitDate: 2018-07-15 21:47:33 +0000

    config: cache profile.bashrc stat results (bug 649806)
    Optimize config to stat profile.bashrc files once in the constructor,
    in order to avoid repeated stat calls in the setcpv method.
    Reviewed-by: Brian Dolbec <>

 pym/portage/package/ebuild/ | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)