Solve bug where portage would not "see" my binhost because
authorFabian Groffen <grobian@gentoo.org>
Fri, 12 Oct 2007 10:54:02 +0000 (10:54 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 12 Oct 2007 10:54:02 +0000 (10:54 -0000)
PORTAGE_BINHOST didn't end with a /.  This is actually caused by urljoin
not operating like os.path.join would do.

svn path=/main/branches/prefix/; revision=8081

pym/portage/dbapi/bintree.py

index 91259c0a2407d0fb3628384ab5fc76fa0b2e20cd..db8b192aedac51be7497be59294ca984a81b9ecf 100644 (file)
@@ -560,6 +560,9 @@ class binarytree(object):
                        not self._remotepkgs:
 
                        base_url = self.settings["PORTAGE_BINHOST"]
+                       # ensure the URL ends with a /, otherwise urljoin strips off
+                       # the last directory, before it adds "Packages"
+                       base_url = base_url.rstrip("/") + "/"
                        from portage.const import CACHE_PATH
                        from urlparse import urlparse
                        urldata = urlparse(base_url)