Bug 204200

Summary: [PATCH] YumHeaderPackage.getProvidesNames() is broken
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-26 18:03:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Schwendt 2006-08-26 17:58:09 UTC
$ rpm -q yum
yum-2.9.5-2

Due to an implementation bug, the method returns an empty list for
all local packages. You want either one of these fixes:

--- packages.py.orig    2006-08-26 19:53:57.000000000 +0200
+++ packages.py 2006-08-26 19:56:46.000000000 +0200
@@ -550,8 +550,8 @@
         """returns a list of providesNames"""
         
         provnames = self.tagByName('providename')
-        if type(provnames) is not types.ListType():
-            if type(provnames) is types.StringType():
+        if type(provnames) is not types.ListType:
+            if type(provnames) is types.StringType:
                 provnames = [provnames]
             else:
                 provnames = []


Or:

--- packages.py.orig    2006-08-26 19:53:57.000000000 +0200
+++ packages.py 2006-08-26 19:56:57.000000000 +0200
@@ -550,8 +550,8 @@
         """returns a list of providesNames"""
         
         provnames = self.tagByName('providename')
-        if type(provnames) is not types.ListType():
-            if type(provnames) is types.StringType():
+        if not isinstance(provnames,list):
+            if isinstance(provnames,str):
                 provnames = [provnames]
             else:
                 provnames = []

Comment 1 Seth Vidal 2006-08-26 18:03:32 UTC
Thank you for the patch, however, recent changes to cvs (in the last couple of
days, actually) have removed the code entirely for a method already written. So
the patch doesn't have any place to apply.

However, your patch is quite correct for 2.9.5
thanks

Comment 2 Michael Schwendt 2006-08-26 18:31:49 UTC
Is that code that will be in FC6? Else closing this as fixed UPSTREAM
is not the right thing to do. Rawhide remains broken until fixed.


Comment 3 Seth Vidal 2006-08-26 18:32:40 UTC
yes it is code that will be in fc6.