Don't use urljoin() in binarytree.gettbz2() since it doesn't work correctly wih unrec...
authorZac Medico <zmedico@gentoo.org>
Mon, 25 Jun 2007 06:28:38 +0000 (06:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 25 Jun 2007 06:28:38 +0000 (06:28 -0000)
svn path=/main/branches/2.1.2/; revision=7028

pym/portage.py

index 2a1c1c6ca69fefbcd362f9156fe0eb4db7b37eb0..79bb3ca0b98472aeb21fd4c6e9ba03303e663898 100644 (file)
@@ -6818,8 +6818,9 @@ class binarytree(object):
                        os.makedirs(mydest, 0775)
                except (OSError, IOError):
                        pass
-               from urlparse import urljoin, urlparse
-               url = urljoin(self.settings["PORTAGE_BINHOST"], tbz2name)
+               from urlparse import urlparse
+               # urljoin doesn't work correctly with unrecognized protocols like sftp
+               url = self.settings["PORTAGE_BINHOST"].rstrip("/") + "/" + tbz2name
                protocol = urlparse(url)[0]
                fcmd_prefix = "FETCHCOMMAND"
                if resume: