def needsNetwork(self):
def _isURL(s):
@@ -677,7 +678,7 @@ class AnacondaYum(YumSorter):
c = ConfigParser()
# If there's no .treeinfo for this repo, don't bother looking for addons.
- treeinfo = self._getTreeinfo(baseurl)
+ treeinfo = self._getTreeinfo(baseurl, repo.proxy_url)
if not treeinfo:
return retval
@@ -702,7 +703,11 @@ class AnacondaYum(YumSorter):
return retval
- def _getTreeinfo(self, baseurl):
+ def _getTreeinfo(self, baseurl, proxy_url=None):
+ """
+ Try to get .treeinfo file from baseurl, optionally using proxy_url
+ Saves the file into /tmp/.treeinfo
+ """
if baseurl.startswith("http") or baseurl.startswith("ftp"):
if not network.hasActiveNetDev():
if not self.anaconda.intf.enableNetwork():
@@ -711,25 +716,36 @@ class AnacondaYum(YumSorter):
urlgrabber.grabber.reset_curl_obj()
ug = URLGrabber()
+ if proxy_url and proxy_url.startswith("http"):
+ proxies = { 'http' : proxy_url,
+ 'https' : proxy_url }
+ elif proxy_url and proxy_url.startswith("ftp"):
+ proxies = { 'ftp' : proxy_url }
+ else:
+ proxies = {}
- # We need to make sure $releasever gets set up before .repo files are
- # read. Since there's no redhat-release package in /mnt/sysimage (and
- # won't be for quite a while), we need to do our own substutition.
def _getReleasever(self):
+ """
+ We need to make sure $releasever gets set up before .repo files are
+ read. Since there's no redhat-release package in /mnt/sysimage (and
+ won't be for quite a while), we need to do our own substutition.
+ """
c = ConfigParser()
- treeinfo = self._getTreeinfo(self._baseRepoURL)
+ treeinfo = self._getTreeinfo(self._baseRepoURL, self.proxy_url)
if not treeinfo:
return productVersion
--
1.7.3.2
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list