Bug 204200 - [PATCH] YumHeaderPackage.getProvidesNames() is broken
[PATCH] YumHeaderPackage.getProvidesNames() is broken
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-26 13:58 EDT by Michael Schwendt
Modified: 2014-01-21 17:54 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-26 14:03:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Schwendt 2006-08-26 13:58:09 EDT
$ 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 14:03:32 EDT
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 14:31:49 EDT
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 14:32:40 EDT
yes it is code that will be in fc6.

Note You need to log in before you can comment on or make changes to this bug.