Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 539450 Details for
Bug 650814
sys-apps/portage: portdbapi could avoid stat calls in findname2 method
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portdbapi.findname2: avoid os.access call
0001-portdbapi.findname2-avoid-os.access-call-bug-650814.patch (text/plain), 1.27 KB, created by
Zac Medico
on 2018-07-13 22:30:21 UTC
(
hide
)
Description:
portdbapi.findname2: avoid os.access call
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2018-07-13 22:30:21 UTC
Size:
1.27 KB
patch
obsolete
>From e89b9526a8e77f0ce6f730bff29e2236a5928f6e Mon Sep 17 00:00:00 2001 >From: Zac Medico <zmedico@gentoo.org> >Date: Fri, 13 Jul 2018 15:19:29 -0700 >Subject: [PATCH] portdbapi.findname2: avoid os.access call (bug 650814) > >Bug: https://bugs.gentoo.org/650814 >--- > pym/portage/dbapi/porttree.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py >index 3e36024ff..24e3f49bf 100644 >--- a/pym/portage/dbapi/porttree.py >+++ b/pym/portage/dbapi/porttree.py >@@ -495,8 +495,12 @@ class portdbapi(dbapi): > relative_path = mysplit[0] + _os.sep + psplit[0] + _os.sep + \ > mysplit[1] + ".ebuild" > >+ skip_access = myrepo is not None and myrepo is getattr(mycpv, 'repo', None) >+ > for x in mytrees: > filename = x + _os.sep + relative_path >+ if skip_access: >+ return (filename, x) > if _os.access(_unicode_encode(filename, > encoding=encoding, errors=errors), _os.R_OK): > return (filename, x) >@@ -644,7 +648,7 @@ class portdbapi(dbapi): > future.set_exception(PortageKeyError(mycpv)) > return future > >- myebuild, mylocation = self.findname2(mycpv, mytree) >+ myebuild, mylocation = self.findname2(mycpv, mytree=mytree, myrepo=myrepo) > > if not myebuild: > writemsg("!!! aux_get(): %s\n" % \ >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 650814
:
539450
|
539452