summaryrefslogtreecommitdiff
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
parentWhen processing output from the "depend" phase, use the number of lines as (diff)
downloadportage-multirepo-fbe0e22f981b5614e6bc624a124925e56e88b8f0.tar.gz
portage-multirepo-fbe0e22f981b5614e6bc624a124925e56e88b8f0.tar.bz2
portage-multirepo-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 00062481..2b0ebd6f 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)