diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-05-01 21:49:52 -0400 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-05-01 21:50:32 -0400 |
commit | e2cfde2acacd2e2cd65805f54286d6802d1b0ecc (patch) | |
tree | c2d1a1b51dadfcfc2dd4eb810c3c2e4a2117a645 | |
parent | bca7cf22396eb11fd8996760459fd0ce64fc5865 (diff) | |
download | anaconda-e2cfde2acacd2e2cd65805f54286d6802d1b0ecc.tar.gz anaconda-e2cfde2acacd2e2cd65805f54286d6802d1b0ecc.tar.xz anaconda-e2cfde2acacd2e2cd65805f54286d6802d1b0ecc.zip |
Use 'yum clean all' when cleaning up after an upgrade, not preupgrade (#374921)
-rw-r--r-- | yuminstall.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/yuminstall.py b/yuminstall.py index 00c5ce5e4..af26e8007 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1578,14 +1578,6 @@ class YumBackend(AnacondaBackend): # expire yum caches on upgrade if anaconda.id.getUpgrade() and os.path.exists("%s/var/cache/yum" %(anaconda.rootPath,)): log.info("Expiring yum caches") - for d in os.listdir("%s/var/cache/yum" %(anaconda.rootPath,)): - try: - os.unlink("%s/var/cache/yum/%s/cachecookie" %(anaconda.rootPath, d)) - except: - pass - - # nuke preupgrade - if flags.cmdline.has_key("preupgrade") and anaconda.id.getUpgrade(): try: iutil.execWithRedirect("yum", ["clean", "all"], stdout="/dev/tty5", stderr="/dev/tty5", @@ -1593,6 +1585,13 @@ class YumBackend(AnacondaBackend): except: 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,)): + try: + shutil.rmtree("%s/var/cache/yum/anaconda-upgrade" %(anaconda.rootPath,)) + except: + pass + # XXX: write proper lvm config AnacondaBackend.doPostInstall(self, anaconda) |