summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-08-27 17:05:34 -0400
committerChris Lumens <clumens@redhat.com>2008-08-27 17:05:34 -0400
commit968253c2ff491e048565cfcfb63f1fd12e39f0ec (patch)
tree7e5c9ac5b910d620eea1c8b00990b61154df8a38
parent9f58cc419e7dccf2f816cb100f5b9e72d23ade0d (diff)
downloadanaconda-968253c2ff491e048565cfcfb63f1fd12e39f0ec.tar.gz
anaconda-968253c2ff491e048565cfcfb63f1fd12e39f0ec.tar.xz
anaconda-968253c2ff491e048565cfcfb63f1fd12e39f0ec.zip
For all HTTP/FTP repos, keep the cached repodata (#173441).
The idea here is that if we keep all the repodata we downloaded and cached during installation, performing yum operations post-installation will be faster because we'll already have the repodata.
-rw-r--r--yuminstall.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 354dc9c63..74ad38ed6 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -268,7 +268,11 @@ class AnacondaYumRepo(YumRepository):
def dirCleanup(self):
if os.path.isdir(self.getAttribute('cachedir')):
- shutil.rmtree(self.getAttribute('cachedir'))
+ if self.needsNetwork():
+ shutil.rmtree("%s/headers" % self.getAttribute('cachedir'))
+ shutil.rmtree("%s/packages" % self.getAttribute('cachedir'))
+ else:
+ shutil.rmtree(self.getAttribute('cachedir'))
class YumSorter(yum.YumBase):
def _transactionDataFactory(self):