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 > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 09-30-2010, 02:26 PM
Radek Vykydal
 
Default Get rid of anacondaBaseURL store the url in RepoSpec.

---
pyanaconda/yuminstall.py | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index 47ba336..b6f5074 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -128,8 +128,6 @@ class RepoSpec(object):
id += "-%s" % productStamp
return id

-
- # TODORV: remove from AnacondaYumRepo?
def needsNetwork(self):
return (self.url.startswith("http") or
self.url.startswith("ftp:") or
@@ -512,7 +510,7 @@ class AnacondaYumRepo(YumRepository):
YumRepository.__init__(self, *args, **kwargs)
self.enablegroups = True
self.sslverify = True
- self._anacondaBaseURLs = []
+ self.repoSpec = None

def needsNetwork(self):
def _isURL(s):
@@ -537,17 +535,6 @@ class AnacondaYumRepo(YumRepository):
if os.path.exists("%s/packages" % cachedir):
shutil.rmtree("%s/packages" % cachedir)

- # needed to store nfs: repo url that yum doesn't know
- def _getAnacondaBaseURLs(self):
- return self._anacondaBaseURLs or self.baseurl or [self.mirrorlist]
-
- def _setAnacondaBaseURLs(self, value):
- self._anacondaBaseURLs = value
-
- anacondaBaseURLs = property(_getAnacondaBaseURLs, _setAnacondaBaseURLs,
- doc="Extends AnacondaYum.baseurl to store non-yum urls:")
-
-
class YumSorter(yum.YumBase):
def _transactionDataFactory(self):
return SplitMediaTransactionData()
@@ -774,7 +761,7 @@ class AnacondaYum(YumSorter):
continue

def _handleFailure(self, package):
- if package.repo.anacondaBaseURLs[0].startswith("cdrom:"):
+ if package.repo.repoSpec.url.startswith("cdrom:"):
buttons = [_("Re_boot"), _("_Eject")]
else:
buttons = [_("Re_boot"), _("_Retry")]
@@ -796,7 +783,7 @@ class AnacondaYum(YumSorter):
if os.path.exists(package.localPkg()):
os.unlink(package.localPkg())

- if package.repo.anacondaBaseURLs[0].startswith("cdrom:"):
+ if package.repo.repoSpec.url.startswith("cdrom:"):
self._switchCD(self.currentMedia)
else:
return
@@ -812,7 +799,7 @@ class AnacondaYum(YumSorter):
"or downloaded file is corrupt" % (obj.url, repo.grab._next + 1,
len(repo.grab.mirrors)))

- if repo.anacondaBaseURLs[0].startswith("cdrom:"):
+ if repo.repoSpec.url.startswith("cdrom:"):
dev = self.anaconda.storage.devicetree.getDeviceByName(s elf.anaconda.mediaDevice)
dev.format.mountpoint = self.tree
unmountCD(dev, self.anaconda.intf.messageWindow)
@@ -1348,6 +1335,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
repo.initYumRepo(yumrepo)
yumrepo.enable()
repo.yumrepo = yumrepo
+ yumrepo.repoSpec = repo
try:
ayum.repos.add(yumrepo)
except yum.Errors.DuplicateRepoError, e:
--
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 04:33 PM.

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