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 > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 02-22-2011, 08:33 AM
Martin Sivak
 
Default Fix downloading .treeinfo files for --noverifyssl repos.

Looks good.

--
Martin Sivák
msivak@redhat.com
Red Hat Czech
Anaconda team / Brno, CZ

----- Original Message -----
> Resolves: rhbz#678574
> ---
> yuminstall.py | 15 +++++++++++----
> 1 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/yuminstall.py b/yuminstall.py
> index a00d026..3e7f90d 100644
> --- a/yuminstall.py
> +++ b/yuminstall.py
> @@ -682,7 +682,7 @@ class AnacondaYum(YumSorter):
> c = ConfigParser()
>
> # If there's no .treeinfo for this repo, don't bother looking for
> addons.
> - treeinfo = self._getTreeinfo(baseurl, repo.proxy_url)
> + treeinfo = self._getTreeinfo(baseurl, repo.proxy_url,
> repo.sslverify)
> if not treeinfo:
> return retval
>
> @@ -707,7 +707,7 @@ class AnacondaYum(YumSorter):
>
> return retval
>
> - def _getTreeinfo(self, baseurl, proxy_url=None):
> + def _getTreeinfo(self, baseurl, proxy_url, sslverify):
> """
> Try to get .treeinfo file from baseurl, optionally using proxy_url
> Saves the file into /tmp/.treeinfo
> @@ -722,6 +722,11 @@ class AnacondaYum(YumSorter):
> urlgrabber.grabber.reset_curl_obj()
>
> ug = URLGrabber()
> + ugopts = {
> + "ssl_verify_peer" : sslverify,
> + "ssl_verify_host" : sslverify
> + }
> +
> if proxy_url and proxy_url.startswith("http"):
> proxies = { 'http' : proxy_url,
> 'https' : proxy_url }
> @@ -732,7 +737,7 @@ class AnacondaYum(YumSorter):
>
> try:
> ug.urlgrab("%s/.treeinfo" % baseurl, "/tmp/.treeinfo",
> - copy_local=1, proxies=proxies)
> + copy_local=1, proxies=proxies, **ugopts)
> except Exception as e:
> try:
> ug.urlgrab("%s/treeinfo" % baseurl, "/tmp/.treeinfo",
> @@ -751,7 +756,9 @@ class AnacondaYum(YumSorter):
> """
> c = ConfigParser()
>
> - treeinfo = self._getTreeinfo(self._baseRepoURL, self.proxy_url)
> + treeinfo = self._getTreeinfo(self._baseRepoURL,
> + self.proxy_url,
> + not flags.noverifyssl)
> if not treeinfo:
> return productVersion
>
> --
> 1.7.3.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
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 05:29 AM.

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