summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-25 06:21:33 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-25 06:21:33 +0000
commit08e46934882df17e5e70f06b2f31eb6fc4d6cd0d (patch)
tree0d0a27c334f4f4abb0d823de8ba22b96542f6c3b
parent084876034186fb7ccadee0bea99199dbe69a2990 (diff)
downloadportage-08e46934882df17e5e70f06b2f31eb6fc4d6cd0d.tar.gz
portage-08e46934882df17e5e70f06b2f31eb6fc4d6cd0d.tar.bz2
portage-08e46934882df17e5e70f06b2f31eb6fc4d6cd0d.zip
Don't use urljoin() in binarytree.gettbz2() since it doesn't work correctly wih unrecognized protocols like sftp.
svn path=/main/trunk/; revision=7027
-rw-r--r--pym/portage/dbapi/bintree.py7
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: