[PATCH 08/10] Move methods from yum repo object to anaconda repo spec object.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/yuminstall.py |   25 +------------------------
 1 files changed, 1 insertions(+), 24 deletions(-)

diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index b6f5074..3ddf6b2 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -512,29 +512,6 @@ class AnacondaYumRepo(YumRepository):
         self.sslverify = True
         self.repoSpec = None
 
-    def needsNetwork(self):
-        def _isURL(s):
-            return s.startswith("http") or s.startswith("ftp")
-
-        if len(self.baseurl) > 0:
-            return len(filter(lambda s: _isURL(s), self.baseurl)) > 0
-        elif self.mirrorlist:
-            return _isURL(self.mirrorlist)
-        else:
-            return False
-
-    def dirCleanup(self):
-        cachedir = self.getAttribute('cachedir')
-
-        if os.path.isdir(cachedir):
-            if not self.needsNetwork() or self.name == "Installation Repo" or self.id.startswith("anaconda-"):
-                shutil.rmtree(cachedir)
-            else:
-                if os.path.exists("%s/headers" % cachedir):
-                    shutil.rmtree("%s/headers" % cachedir)
-                if os.path.exists("%s/packages" % cachedir):
-                    shutil.rmtree("%s/packages" % cachedir)
-
 class YumSorter(yum.YumBase):
     def _transactionDataFactory(self):
         return SplitMediaTransactionData()
@@ -1871,7 +1848,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
 
         packages.rpmSetupGraphicalSystem(anaconda)
 
-        for repo in self.ayum.repos.listEnabled():
+        for repo in anaconda.repos:
             repo.dirCleanup()
 
         # expire yum caches on upgrade
-- 
1.7.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux