[PATCH 07/10] Get rid of anacondaBaseURL store the url in RepoSpec.

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

 



---
 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(self.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@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