summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-10 03:37:03 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-10 03:37:03 +0000
commitfbe0e22f981b5614e6bc624a124925e56e88b8f0 (patch)
tree61c872c1861507fa2df6a243e93675419a62c517
parent13db952dc45c29fe2057e60dcafbe84776b1c77a (diff)
downloadportage-fbe0e22f981b5614e6bc624a124925e56e88b8f0.tar.gz
portage-fbe0e22f981b5614e6bc624a124925e56e88b8f0.tar.bz2
portage-fbe0e22f981b5614e6bc624a124925e56e88b8f0.zip
urlparse.urljoin() only works correctly with recognized protocols and
requires the base url to have a trailing slash, so join PORTAGE_BINHOST manually. Thanks to Lance Albertson <ramereth@g.o> for reporting. svn path=/main/trunk/; revision=12192
-rw-r--r--pym/portage/dbapi/bintree.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 000624819..2b0ebd6f4 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -643,7 +643,10 @@ class binarytree(object):
import urllib, urlparse
rmt_idx = self._new_pkgindex()
try:
- f = urllib.urlopen(urlparse.urljoin(base_url, "Packages"))
+ # urlparse.urljoin() only works correctly with recognized
+ # protocols and requires the base url to have a trailing
+ # slash, so join manually...
+ f = urllib.urlopen(base_url.rstrip("/") + "/Packages")
try:
rmt_idx.readHeader(f)
remote_timestamp = rmt_idx.header.get("TIMESTAMP", None)