Red Hat Bugzilla – Bug 189483
yum should clean only packages which it really installed when keepcache=0
Last modified: 2014-01-21 17:54:24 EST
Description of problem:
In FC5 there is by default set keepcache=0 and yum wipes the complete cache when
it succesfully finishes ANY job. This result is situation like this:
1. yum update (you download lot of updates e.g. 500MB), on transaction test you
end up with some kind of error or you cancel the operation. Yum keeps the cache.
2. You decide at least to update kernel. Using yum update kernel wipes complete
cache as this operation was successful.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. yum update
2. cancel the operation after you download all updates
3. yum install <whatever>
Complete cache is cleaned.
Only those package that really were installed should be deleted when keepcache=0.
This happens to me with yum-2.6.1-0.fc5. Very annoying feature.
Relevant code is in __init__.py:
def runTransaction(self, cb):
"""takes an rpm callback object, performs the transaction"""
raise Errors.YumBaseError, errors
if not self.conf.keepcache:
for repo in self.repos.listEnabled():
path = repo.pkgdir
filelist = misc.getFileList(path, ext, filelist)
for pkg in filelist:
In other words, any successful transaction calls cleanPackages and cleanHeaders,
which in turn unlink every file in the 'pkgdir's and 'hdrdir's respectively.
A simple way to get this:
- Install some old i386 package on x86_64
- Upgrade to the x86_64 version
The result is a file conflict, and yum fails.
This happened in rawhide with OOo and lately with xfce from the xfce44beta repo
Patch committed upstream, will be in 2.9.4