Bug 175335

Summary: repoquery, yumdownloader broken by yum 2.5.0 update
Product: [Fedora] Fedora Reporter: Ville Skyttä <scop>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: extras-qa, hdegoede, jbev, katzj, lmacken, nalin, paul, pmatilai, tmayberr, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-25 09:07:53 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:
Bug Depends On:    
Bug Blocks: 162161    
Attachments:
Description Flags
Quick and dirty fix for repoquery
none
Fix yumdownloader for yum 2.5.0 none

Description Ville Skyttä 2005-12-08 22:51:59 UTC
The update to yum-2.5.0-0.20051207 in devel seems to have broken repoquery, even
with latest CVS of it.

$ repoquery --whatrequires --alldeps openct
Traceback (most recent call last):
  File "/usr/bin/repoquery", line 646, in ?
    main(sys.argv)
  File "/usr/bin/repoquery", line 598, in main
    repoq = YumBaseQuery(pkgops, sackops, opts)
  File "/usr/bin/repoquery", line 299, in __init__
    self.conf = yum.config.yumconf()
AttributeError: 'module' object has no attribute 'yumconf'

Comment 1 Ville Skyttä 2005-12-09 22:49:29 UTC
yumdownloader is broken too (also both in yum-utils-0.3.1-1.fc5 and CVS HEAD):

$ yumdownloader xemacs-sumo
Traceback (most recent call last):
  File "/usr/bin/yumdownloader", line 27, in ?
    from yum.packages import parsePackages, returnBestPackages
ImportError: cannot import name returnBestPackages


Comment 2 Ville Skyttä 2005-12-14 22:07:41 UTC
Created attachment 122252 [details]
Quick and dirty fix for repoquery

Here's a quick and dirty fix for repoquery which appears to work with both yum
2.4.1 and 2.5.0.

Comment 3 Panu Matilainen 2005-12-15 07:12:39 UTC
Thanks Ville, applied in yum-utils HEAD.

Comment 4 Ville Skyttä 2005-12-15 20:32:57 UTC
Hm, I don't see it applied yet:
http://devel.linux.duke.edu/cgi-bin/viewcvs.cgi/yum-utils/repoquery.py

Comment 6 Ville Skyttä 2005-12-15 21:36:52 UTC
No I'm not... it just isn't applied there.

Comment 7 Ville Skyttä 2005-12-15 22:30:15 UTC
Created attachment 122306 [details]
Fix yumdownloader for yum 2.5.0

Here's a fix for yumdownloader.  Appears to work only with yum 2.5.0.

Comment 8 Panu Matilainen 2005-12-17 13:49:07 UTC
It's applied, seems to be some sort of problem with viewcvs:

[gotcha]$ cvs diff -r 1.25 -r 1.26 repoquery.py
Index: repoquery.py
===================================================================
RCS file: //home/groups/yum/cvs/yum-utils/repoquery.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- repoquery.py        25 Nov 2005 17:33:27 -0000      1.25
+++ repoquery.py        15 Dec 2005 07:14:35 -0000      1.26
@@ -296,7 +296,6 @@
 class YumBaseQuery(yum.YumBase):
     def __init__(self, pkgops = [], sackops = [], options = None):
         yum.YumBase.__init__(self)
-        self.conf = yum.config.yumconf()
         self.options = options
         self.pkgops = pkgops
         self.sackops = sackops


Comment 9 Ville Skyttä 2005-12-17 16:58:03 UTC
Okay, you're using a different CVS root than what's instructed at
http://linux.duke.edu/projects/yum/cvs.ptml (/home/groups/yum/cvs vs
/cvsroot/yum/cvs).  I'm using the latter and I guess viewcvs is too.  cvs tells
me that the latest revision in /cvsroot/yum/cvs is 1.25.

Comment 10 Seth Vidal 2005-12-17 17:29:58 UTC
viewcvs runs off of an rsync of the cvs tree that's made every half hour.

it doesn't use the live cvs tree.



Comment 11 Tim Mayberry 2006-02-01 06:09:55 UTC
It seems that this bug is still apparent in current version of repoquery in the
yum-utils package. If this bug has been fixed is there any plan to release a new
version of the yum-utils package?

Comment 12 Panu Matilainen 2006-02-01 09:32:24 UTC
I've been intending to do a new yum-utils release for a while now, yumdownloader
being the thing that's holding it up. The thing is, everything else but it
currently works with both yum-2.4 and 2.5 and I'd hate to fork the development
just because of that... However it seems that there's going to be some major
changes in YUM API in near future which will require forking anyway so maybe
I'll just bite the bullet and make separate releases for 2.4 and 2.5. 

Comment 13 Jeremy Katz 2006-02-09 15:58:27 UTC
*** Bug 179370 has been marked as a duplicate of this bug. ***

Comment 14 Hans de Goede 2006-02-17 09:36:30 UTC
This is one anoying bug, Seth is it ok with you if I push a nem yum-utils with
these 2 patches to CVS and the build-server (devel branch only)?


Comment 15 Ville Skyttä 2006-02-25 09:07:53 UTC
0.5-1 appears to fix these.  yumdownloader is somewhat noisy though:

/usr/lib/python2.4/site-packages/yum/config.py:447: DeprecationWarning:
setConfigOption() will go away in a future version of Yum.
Please set option values as attributes or using setattr().
  DeprecationWarning)
/usr/lib/python2.4/site-packages/yum/config.py:439: DeprecationWarning:
getConfigOption() will go away in a future version of Yum.
Please access option values as attributes or using getattr().
  DeprecationWarning)