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 317285 Details for
Bug 460777
RFE: make yum _bestPackageFRomList use compare_providers()
[?]
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]
Use _compare_providers in _bestPackageFromList
0001-Use-_compare_providers-in-_bestPackageFromList.patch (text/plain), 2.28 KB, created by
Ville Skyttä
on 2008-09-20 11:13:58 UTC
(
hide
)
Description:
Use _compare_providers in _bestPackageFromList
Filename:
MIME Type:
Creator:
Ville Skyttä
Created:
2008-09-20 11:13:58 UTC
Size:
2.28 KB
patch
obsolete
>From f1c82d46c34c2b97c02d055341bb0db6da332529 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> >Date: Sat, 20 Sep 2008 14:03:00 +0300 >Subject: [PATCH] Use _compare_providers() in _bestPackageFromList(). > >--- > yum/__init__.py | 34 +++------------------------------- > 1 files changed, 3 insertions(+), 31 deletions(-) > >diff --git a/yum/__init__.py b/yum/__init__.py >index 29c57c2..e815cdd 100644 >--- a/yum/__init__.py >+++ b/yum/__init__.py >@@ -54,7 +54,7 @@ import transactioninfo > import urlgrabber > from urlgrabber.grabber import URLGrabError > from urlgrabber.progress import format_number >-from packageSack import packagesNewestByNameArch, packagesNewestByName >+from packageSack import packagesNewestByNameArch > import depsolve > import plugins > import logginglevels >@@ -2116,36 +2116,8 @@ class YumBase(depsolve.Depsolve): > if len(pkglist) == 1: > return pkglist[0] > >- bestlist = packagesNewestByNameArch(pkglist) >- # Here we need the list of the latest version of each package >- # the problem we are trying to fix is: ABC-1.2.i386 and ABC-1.3.noarch >- # so in the above we need to "exclude" ABC < 1.3, which is done by >- # making another list from newest by name and then make sure any pkg is >- # in nbestlist. >- nbestlist = packagesNewestByName(bestlist) >- >- best = nbestlist[0] >- nbestlist = set(nbestlist) >- for pkg in bestlist: >- if pkg == best: >- continue >- if pkg not in nbestlist: >- continue >- >- # This is basically _compare_providers() ... but without a reqpo >- if len(pkg.name) < len(best.name): # shortest name silliness >- best = pkg >- continue >- elif len(pkg.name) > len(best.name): >- continue >- >- # compare arch >- arch = rpmUtils.arch.getBestArchFromList([pkg.arch, best.arch]) >- if arch == pkg.arch: >- best = pkg >- continue >- >- return best >+ bestlist = self._compare_providers(pkglist, None) >+ return bestlist[0][0] > > def bestPackagesFromList(self, pkglist, arch=None, single_name=False): > """Takes a list of packages, returns the best packages. >-- >1.5.5.1 >
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 460777
:
315449
|
315450
| 317285