summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-07-10 11:28:45 -0400
committerChris Lumens <clumens@redhat.com>2009-07-10 13:31:35 -0400
commitd6e674e410e46d4323d18dee7455408f51bdd340 (patch)
treeb74d8f4eb9fc1fba5c9bca02e1b597f4357baed2 /yuminstall.py
parentadcc400134113f8ea2b54c608eb878f6ccce51e6 (diff)
downloadanaconda-d6e674e410e46d4323d18dee7455408f51bdd340.tar.gz
anaconda-d6e674e410e46d4323d18dee7455408f51bdd340.tar.xz
anaconda-d6e674e410e46d4323d18dee7455408f51bdd340.zip
Clean yum caches following preupgrade, too (#503096).
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 0491fad97..31ed4ea3e 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1584,7 +1584,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
repo.dirCleanup()
# expire yum caches on upgrade
- if anaconda.id.getUpgrade() and os.path.exists("%s/var/cache/yum" %(anaconda.rootPath,)):
+ if (flags.cmdline.has_key("preupgrade") or anaconda.id.getUpgrade()) and os.path.exists("%s/var/cache/yum" %(anaconda.rootPath,)):
log.info("Expiring yum caches")
try:
iutil.execWithRedirect("yum", ["clean", "all"],
@@ -1595,7 +1595,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
pass
# nuke preupgrade
- if flags.cmdline.has_key("preupgrade") and anaconda.id.getUpgrade() and os.path.exists("%s/var/cache/yum/anaconda-upgrade" %(anaconda.rootPath,)):
+ if flags.cmdline.has_key("preupgrade") and os.path.exists("%s/var/cache/yum/anaconda-upgrade" %(anaconda.rootPath,)):
try:
shutil.rmtree("%s/var/cache/yum/anaconda-upgrade" %(anaconda.rootPath,))
except: