summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-12 21:30:00 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-12 21:30:00 +0000
commita48ef26b7203e34728c6e772890e2833cda03eac (patch)
tree55147b173df3d94a9acfe05b56e2d042f339197e /pym
parentd113b772b6a015616c0fd911ed6c8f95513d9ffb (diff)
downloadportage-a48ef26b7203e34728c6e772890e2833cda03eac.tar.gz
portage-a48ef26b7203e34728c6e772890e2833cda03eac.tar.bz2
portage-a48ef26b7203e34728c6e772890e2833cda03eac.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. (trunk r12192) svn path=/main/branches/2.1.6/; revision=12225
Diffstat (limited to 'pym')
-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)