Fix broken base_uri handling for old-style binhosts in binarytree.gettbz2().
authorZac Medico <zmedico@gentoo.org>
Sun, 24 Jun 2007 20:36:52 +0000 (20:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 24 Jun 2007 20:36:52 +0000 (20:36 -0000)
svn path=/main/trunk/; revision=7002

pym/portage/dbapi/bintree.py

index 1930bc71d3b7a5df8cfd5589804838f49ab76a59..a2ce78b0c640654279f5f2ce04d72f7207b2e4d0 100644 (file)
@@ -857,16 +857,15 @@ class binarytree(object):
                except (OSError, IOError):
                        pass
                from urlparse import urljoin
-               base_url = self._remote_base_uri
                fcmd = self.settings["RESUMECOMMAND"]
                if self._remote_has_index:
                        rel_url = self._remotepkgs[pkgname].get("PATH")
                        if not rel_url:
                                rel_url = pkgname+".tbz2"
-                       url = urljoin(base_url, rel_url)
+                       url = urljoin(self._remote_base_uri, rel_url)
                        success = portage.getbinpkg.file_get(url, mydest, fcmd=fcmd)
                else:
-                       url = urljoin(base_url, tbz2name)
+                       url = urljoin(self.settings["PORTAGE_BINHOST"], tbz2name)
                        success = portage.getbinpkg.file_get(url, mydest, fcmd=fcmd)
                if success and "strict" in self.settings.features:
                        metadata = self._remotepkgs[pkgname]