diff options
-rw-r--r-- | pym/portage/dbapi/bintree.py | 7 |
1 files changed, 4 insertions, 3 deletions
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: |