[PATCH rhel6-branch master 2/2] Setup proxy on repos (#604137)

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

 



repos with no associated config file do not inherit the proxy from
the main yum.conf file, add the proxy setting passed from stage1
to AnacondaYumRepo objects that we create.

Related: rhbz#604137
---
 yuminstall.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index f6264b7..cc12e42 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -570,6 +570,9 @@ class AnacondaYum(YumSorter):
                 repo.mediaid = getMediaId(self.tree)
                 log.info("set mediaid of repo %s to: %s" % (rid, repo.mediaid))
 
+            if self.anaconda.proxy:
+                repo.setProxyFromString(self.anaconda.proxy)
+
             repo.enable()
             open("/tmp/yum-proxy.log","a").write("configBaseRepo: %s %s\n"%(repo.name, repo.proxy))
             open("/tmp/yum-proxy.log","a").write(repo.dump())
@@ -757,6 +760,10 @@ class AnacondaYum(YumSorter):
             repo = AnacondaYumRepo(rid)
             repo.baseurl = [ "file://%s" % d ]
             repo.name = "Driver Disk %s" % dirname.split("-")[1]
+
+            if self.anaconda.proxy:
+                repo.setProxyFromString(self.anaconda.proxy)
+
             repo.enable()
             open("/tmp/yum-proxy.log","a").write("DriverDisk %s %s\n"%(repo.name, repo.proxy))
             extraRepos.append(repo)
@@ -817,6 +824,9 @@ class AnacondaYum(YumSorter):
                 addonRepo.name = addon[0]
                 addonRepo.baseurl = [ addon[1] ]
 
+                if self.anaconda.proxy:
+                    addonRepo.setProxyFromString(self.anaconda.proxy)
+
                 extraRepos.append(addonRepo)
 
         for repo in extraRepos:
-- 
1.7.0.1

_______________________________________________
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