Red Hat Bugzilla – Bug 155614
yum should update itself first
Last modified: 2014-01-21 17:51:41 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1
Description of problem:
Manual intervention needed to make yum function properly. yum install gcc crashes, but yum update yum;yum install gcc works. Therefore yum needs to check for updates to itself before it does any other processing.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install minimal x86_64 system
2. yum install gcc
Actual Results: Yum crashes
---> Package glibc-kernheaders.x86_64 0:2.4-9.1.87 set to be installed
--> Running transaction check
--> Processing Conflict: glibc-common conflicts glibc< 2.3.5
Traceback (most recent call last):
File "/usr/bin/yum", line 8, in ?
File "/usr/share/yum-cli/yummain.py", line 104, in main
(result, resultmsgs) = base.buildTransaction()
File "/usr/lib/python2.3/site-packages/yum/__init__.py", line 174, in buildTransaction
(rescode, restring) = self.resolveDeps()
File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 190, in resolveDeps
(checkdep, missing, conflict, errormsgs) = self._processConflict(dep)
File "/usr/lib/python2.3/site-packages/yum/depsolve.py", line 492, in _processConflict
uplist = self.up.getUpdatesList(name=confname)
UnboundLocalError: local variable 'confname' referenced before assignment
Expected Results: It should install gcc
Workaround is to yum update yum first.
I think your workaround IS the fix.
yum should not update itself first if only b/c in certain situations it would
pull in an array of other, unexpected, things for the user.
running yum update gcc
and getting an update of:
yum, python, rpm, rpm-python, python-elementtree and sqlite
wouldn't exactly be very nice for a user just looking for a gcc update.
the nightly yum update that a user can enable updates yum first and then does a
global update. I think that's fair enough.
So, how about what emerge does, warns the user that yum is out of date and
recommends an update? Simple, non-confusing and would complete the job.
Is it better for the user to guess why yum fails?
my problem with issuing the warning is that it is confusing to the user too. I'm
not sure there is a good answer to this. I'm just not keen on doing it that way.