From 08e46934882df17e5e70f06b2f31eb6fc4d6cd0d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 25 Jun 2007 06:21:33 +0000 Subject: Don't use urljoin() in binarytree.gettbz2() since it doesn't work correctly wih unrecognized protocols like sftp. svn path=/main/trunk/; revision=7027 --- pym/portage/dbapi/bintree.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pym') diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 5cc959615..9898639e1 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -864,14 +864,15 @@ class binarytree(object): os.makedirs(mydest, 0775) except (OSError, IOError): pass - from urlparse import urljoin, urlparse + from urlparse import urlparse + # urljoin doesn't work correctly with unrecognized protocols like sftp if self._remote_has_index: rel_url = self._remotepkgs[pkgname].get("PATH") if not rel_url: rel_url = pkgname+".tbz2" - url = urljoin(self._remote_base_uri, rel_url) + url = self._remote_base_uri.rstrip("/") + "/" + rel_url.lstrip("/") else: - url = urljoin(self.settings["PORTAGE_BINHOST"], tbz2name) + url = self.settings["PORTAGE_BINHOST"].rstrip("/") + "/" + tbz2name protocol = urlparse(url)[0] fcmd_prefix = "FETCHCOMMAND" if resume: -- cgit v1.2.3-1-g7c22