Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309118 Details for
Bug 451083
pkgorder speed improvement
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
remove repeated glob.glob calls
pkgorder.diff (text/plain), 1.42 KB, created by
Dennis Gregorovic
on 2008-06-12 18:07:31 UTC
(
hide
)
Description:
remove repeated glob.glob calls
Filename:
MIME Type:
Creator:
Dennis Gregorovic
Created:
2008-06-12 18:07:31 UTC
Size:
1.42 KB
patch
obsolete
>--- pkgorder 2008-04-16 09:53:41.000000000 -0400 >+++ pkgorder.dg 2008-06-12 13:59:38.000000000 -0400 >@@ -9,8 +9,9 @@ > # You should have received a copy of the GNU Library Public License > # along with this program; if not, write to the Free Software > # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >-import os.path >+import fnmatch > import glob >+import os.path > import rpm > import rpmUtils > import shutil >@@ -89,13 +90,7 @@ > def printMatchingPkgs(fpattern): > global processed > >- if os.path.isdir("%s/%s/RPMS" % (toppath, product)): >- matches = glob.glob("%s/%s/RPMS/%s" % (toppath, product, fpattern)) >- elif os.path.isdir("%s/%s" %(toppath, product)): >- matches = glob.glob("%s/%s/%s" % (toppath, product, fpattern)) >- else: >- matches = glob.glob("%s/%s" % (toppath, fpattern)) >- >+ matches = fnmatch.filter(pkgs, fpattern) > for match in matches: > mname = os.path.basename(match) > if processed.has_key(mname): continue >@@ -153,6 +148,17 @@ > (toppath, arch, product) = args > config = createConfig(toppath) > >+ pkg_hash = {} >+ for dir in ("%s/%s/RPMS" % (toppath, product), >+ "%s/%s" %(toppath, product), >+ toppath): >+ if os.path.isdir(dir): >+ for x in os.listdir(dir): >+ pkg_hash[x] = 1 >+ break >+ pkgs = pkg_hash.keys() >+ pkgs.sort() >+ > # Boo. > if arch == "i386": > arch = "i686"
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 451083
: 309118