FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 09-30-2010, 02:26 PM
Radek Vykydal
 
Default Move methods from yum repo object to anaconda repo spec object.

---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org